Skip to content

Commit 2c6389d

Browse files
committed
fix: linting
1 parent 3696750 commit 2c6389d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

main.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,14 @@ func handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyRespo
9898
if secretName == "" {
9999
slog.Error("GITHUB_PAT_SECRET_NAME env var not set")
100100

101-
return events.APIGatewayProxyResponse{StatusCode: http.StatusInternalServerError}, errors.New("secret name missing")
101+
return events.APIGatewayProxyResponse{
102+
StatusCode: http.StatusInternalServerError,
103+
}, errors.New("secret name missing")
102104
}
103105

104106
secretOut, err := sm.GetSecretValue(context.TODO(), &secretsmanager.GetSecretValueInput{SecretId: aws.String(secretName)})
105107
if err != nil {
108+
//nolint:gosec
106109
slog.Error("failed to get secret", "secret", secretName, "error", err.Error())
107110

108111
return events.APIGatewayProxyResponse{StatusCode: http.StatusInternalServerError}, err
@@ -116,9 +119,10 @@ func handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyRespo
116119
}
117120

118121
// discover subnets by tag
119-
subnetTags := strings.Split(os.Getenv("SUBNET_TAGS"), ",")
120122
const tagParts = 2
123+
121124
filters := []types.Filter{}
125+
subnetTags := strings.Split(os.Getenv("SUBNET_TAGS"), ",")
122126

123127
for _, tag := range subnetTags {
124128
parts := strings.SplitN(tag, "=", tagParts)

0 commit comments

Comments
 (0)