Skip to content

Commit

Permalink
make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
oppermax committed Jan 11, 2023
1 parent 12d87be commit 9ff2ec2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion opensearch/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ limitations under the License.

import (
"context"
"github.com/moia-oss/terraform-provider-opensearch-dashboards/pkg/default_index_pattern"
"net/http"

"github.com/moia-oss/terraform-provider-opensearch-dashboards/pkg/default_index_pattern"

"github.com/aws/aws-sdk-go/aws/session"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
Expand Down
4 changes: 3 additions & 1 deletion opensearch/resource_default_index_pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package opensearch

import (
"context"
"fmt"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/rs/zerolog/log"
Expand Down Expand Up @@ -51,7 +53,7 @@ func defaultIndexPatternRead(ctx context.Context, d *schema.ResourceData, m any)
}
err := d.Set("index_pattern_id", resp.IndexPatternId)
if err != nil {
return diag.Errorf("could not set index_pattern_id after fetching from api: %w", err)
return diag.Errorf(fmt.Sprintf("could not set index_pattern_id after fetching from api: %v+", err))
}

return nil
Expand Down
3 changes: 2 additions & 1 deletion pkg/default_index_pattern/default_index_pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"io"
"net/http"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
)

type OpenSearchRequestBody struct {
Expand Down

0 comments on commit 9ff2ec2

Please sign in to comment.