Skip to content

Commit

Permalink
executor: fix compiler warning
Browse files Browse the repository at this point in the history
Signed-off-by: BornChanger <[email protected]>
  • Loading branch information
BornChanger committed Dec 6, 2022
1 parent a86dd8c commit 5565066
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions executor/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -946,10 +946,8 @@ func (e *SimpleExec) executeCreateUser(ctx context.Context, s *ast.CreateUserStm
passwdlockinfo.passwordExpired = "Y"
}

var (
userAttributesStr any = nil
userAttributes []string
)
var userAttributes []string

if s.CommentOrAttributeOption != nil {
if s.CommentOrAttributeOption.Type == ast.UserCommentType {
userAttributes = append(userAttributes, fmt.Sprintf("\"metadata\": {\"comment\": \"%s\"}", s.CommentOrAttributeOption.Value))
Expand All @@ -964,7 +962,7 @@ func (e *SimpleExec) executeCreateUser(ctx context.Context, s *ast.CreateUserStm
}
}
userAttributes = append(userAttributes, fmt.Sprintf("\"resource_group\": \"%s\"", resourceGroupName))
userAttributesStr = fmt.Sprintf("{%s}", strings.Join(userAttributes, ","))
var userAttributesStr = fmt.Sprintf("{%s}", strings.Join(userAttributes, ","))

tokenIssuer := ""
for _, authTokenOption := range s.AuthTokenOrTLSOptions {
Expand Down

0 comments on commit 5565066

Please sign in to comment.