Skip to content

Commit

Permalink
Fix golangci-lint 'ineffassign'.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Jun 28, 2024
1 parent f1e98ce commit bd6c18e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/service/cognitoidp/user_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -999,10 +999,11 @@ func resourceUserPoolUpdate(ctx context.Context, d *schema.ResourceData, meta in
if d.HasChange("lambda_config.0.pre_token_generation") {
preTokenGeneration := d.Get("lambda_config.0.pre_token_generation")
if tfList, ok := v["pre_token_generation_config"].([]interface{}); ok && len(tfList) > 0 && tfList[0] != nil {
tfList[0].(map[string]interface{})["lambda_arn"] = preTokenGeneration
v["pre_token_generation_config"].([]interface{})[0].(map[string]interface{})["lambda_arn"] = preTokenGeneration
} else {
tfList = []interface{}{map[string]interface{}{
"lambda_arn": preTokenGeneration,
v["pre_token_generation_config"] = []interface{}{map[string]interface{}{
"lambda_arn": preTokenGeneration,
"lambda_version": string(awstypes.PreTokenGenerationLambdaVersionTypeV10), // A guess...
}}
}
}
Expand Down

0 comments on commit bd6c18e

Please sign in to comment.