diff options
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 } |