Skip to content

Commit 008508f

Browse files
committed
Omit nil check; len() for nil slices is defined as zero, reported by linter
1 parent 56f42d5 commit 008508f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/service/synthetics/canary.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ func resourceCanaryRead(ctx context.Context, d *schema.ResourceData, meta any) d
394394
}.String()
395395
d.Set(names.AttrARN, canaryArn)
396396
d.Set("artifact_s3_location", canary.ArtifactS3Location)
397-
if canary.EngineConfigs != nil && len(canary.EngineConfigs) > 0 {
397+
if len(canary.EngineConfigs) > 0 {
398398
d.Set("engine_arn", canary.EngineConfigs[0].EngineArn)
399399
}
400400
d.Set(names.AttrExecutionRoleARN, canary.ExecutionRoleArn)

0 commit comments

Comments
 (0)