From a3d45a43daadca2442a336583c23c88be8d3aa16 Mon Sep 17 00:00:00 2001 From: mvishnub Date: Thu, 2 May 2024 09:51:10 +0100 Subject: [PATCH] Fixed lint and semgrep findings --- internal/service/chatbot/slack_workspace_data_source.go | 4 +--- internal/service/chatbot/slack_workspace_data_source_test.go | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/service/chatbot/slack_workspace_data_source.go b/internal/service/chatbot/slack_workspace_data_source.go index e8a4b913582..82ed1118ef5 100644 --- a/internal/service/chatbot/slack_workspace_data_source.go +++ b/internal/service/chatbot/slack_workspace_data_source.go @@ -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 @@ -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 } } @@ -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 { diff --git a/internal/service/chatbot/slack_workspace_data_source_test.go b/internal/service/chatbot/slack_workspace_data_source_test.go index e27a0b8cd40..08cb6b9670f 100644 --- a/internal/service/chatbot/slack_workspace_data_source_test.go +++ b/internal/service/chatbot/slack_workspace_data_source_test.go @@ -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" )