diff options
author | 6543 <6543@obermui.de> | 2022-01-20 18:46:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 18:46:10 +0100 |
commit | 54e9ee37a7a301dbe74d46fd3c87712e6120e9bf (patch) | |
tree | 1be12fb072625c1b896b9d72f7912b018aad502b /cmd/admin.go | |
parent | 1d98d205f5825f40110e6628b61a97c91ac7f72d (diff) | |
download | gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.tar.gz gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.zip |
format with gofumpt (#18184)
* gofumpt -w -l .
* gofumpt -w -l -extra .
* Add linter
* manual fix
* change make fmt
Diffstat (limited to 'cmd/admin.go')
-rw-r--r-- | cmd/admin.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/cmd/admin.go b/cmd/admin.go index 3042df8bb7..66c7959ab3 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -525,7 +525,7 @@ func runCreateUser(c *cli.Context) error { } // always default to true - var changePassword = true + changePassword := true // If this is the first user being created. // Take it as the admin and don't force a password update. @@ -577,7 +577,6 @@ func runListUsers(c *cli.Context) error { } users, err := user_model.GetAllUsers() - if err != nil { return err } @@ -601,7 +600,6 @@ func runListUsers(c *cli.Context) error { w.Flush() return nil - } func runDeleteUser(c *cli.Context) error { @@ -826,7 +824,6 @@ func runUpdateOauth(c *cli.Context) error { if c.IsSet("required-claim-name") { oAuth2Config.RequiredClaimName = c.String("required-claim-name") - } if c.IsSet("required-claim-value") { oAuth2Config.RequiredClaimValue = c.String("required-claim-value") @@ -843,7 +840,7 @@ func runUpdateOauth(c *cli.Context) error { } // update custom URL mapping - var customURLMapping = &oauth2.CustomURLMapping{} + customURLMapping := &oauth2.CustomURLMapping{} if oAuth2Config.CustomURLMapping != nil { customURLMapping.TokenURL = oAuth2Config.CustomURLMapping.TokenURL @@ -926,7 +923,7 @@ func runAddSMTP(c *cli.Context) error { if !c.IsSet("port") { return errors.New("port must be set") } - var active = true + active := true if c.IsSet("active") { active = c.BoolT("active") } @@ -994,7 +991,6 @@ func runListAuth(c *cli.Context) error { } authSources, err := auth.Sources() - if err != nil { return err } |