Skip to content

Commit

Permalink
Fixed lint and semgrep findings
Browse files Browse the repository at this point in the history
  • Loading branch information
mvishnub authored and YakDriver committed May 23, 2024
1 parent 6069dd6 commit a3d45a4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions internal/service/chatbot/slack_workspace_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func (d *dataSourceSlackWorkspace) Schema(ctx context.Context, req datasource.Sc
}

func (d *dataSourceSlackWorkspace) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {

conn := d.Meta().ChatbotClient(ctx)

var data dataSourceSlackWorkspaceData
Expand Down Expand Up @@ -85,7 +84,7 @@ func findSlackWorkspaceByName(ctx context.Context, conn *chatbot.Client, slack_t
}

for _, workspace := range output.SlackWorkspaces {
if *workspace.SlackTeamName == slack_team_name {
if aws.ToString(workspace.SlackTeamName) == slack_team_name {
return &workspace, nil
}
}
Expand All @@ -97,7 +96,6 @@ func findSlackWorkspaceByName(ctx context.Context, conn *chatbot.Client, slack_t
}
// If we are here, then we need to return an error that the data source was not found.
return nil, create.Error(names.Chatbot, "missing", DSNameSlackWorkspace, slack_team_name, nil)

}

type dataSourceSlackWorkspaceData struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-provider-aws/internal/acctest"

"github.com/hashicorp/terraform-provider-aws/names"
)

Expand Down

0 comments on commit a3d45a4

Please sign in to comment.