chore: apply golangci "forbidigo" to all packages (#39151)

This commit is contained in:
wxiaoguang
2026-08-28 00:34:44 +08:00
committed by GitHub
parent 66c672d0b7
commit b7cfa4e67e
17 changed files with 61 additions and 54 deletions
+3 -3
View File
@@ -152,7 +152,7 @@ func runCreateUser(ctx context.Context, c *cli.Command) error {
return err
}
// codeql[disable-next-line=go/clear-text-logging]
fmt.Printf("generated random password is '%s'\n", password)
cprintf(c, "generated random password is '%s'\n", password)
} else if userType == user_model.UserTypeIndividual {
return errors.New("must set either password or random-password flag")
}
@@ -228,7 +228,7 @@ func runCreateUser(ctx context.Context, c *cli.Command) error {
if err := user_model.CreateUser(ctx, u, &user_model.Meta{}, overwriteDefault); err != nil {
return fmt.Errorf("CreateUser: %w", err)
}
fmt.Printf("New user '%s' has been successfully created!\n", username)
cprintf(c, "New user '%s' has been successfully created!\n", username)
// create the access token
if accessTokenScope != "" {
@@ -236,7 +236,7 @@ func runCreateUser(ctx context.Context, c *cli.Command) error {
if err := auth_model.NewAccessToken(ctx, t); err != nil {
return err
}
fmt.Printf("Access token was successfully created... %s\n", t.Token)
cprintf(c, "Access token was successfully created... %s\n", t.Token)
}
return nil
}