diff options
author | Cheng <36215014+ChengenH@users.noreply.github.com> | 2024-04-22 03:44:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-21 19:44:03 +0000 |
commit | 9de443ced2c328d9b58a5e144a765f402aab859d (patch) | |
tree | 313cebffc92930047dce631db8c6597f0bcd0644 /cmd/admin_auth_oauth.go | |
parent | f95622cddc8db24719d10794e50ae6b125e6b96e (diff) | |
download | gitea-9de443ced2c328d9b58a5e144a765f402aab859d.tar.gz gitea-9de443ced2c328d9b58a5e144a765f402aab859d.zip |
chore: use errors.New to replace fmt.Errorf with no parameters will much better (#30621)
use errors.New to replace fmt.Errorf with no parameters will much better
Diffstat (limited to 'cmd/admin_auth_oauth.go')
-rw-r--r-- | cmd/admin_auth_oauth.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/admin_auth_oauth.go b/cmd/admin_auth_oauth.go index c151c0af27..8e6239ac33 100644 --- a/cmd/admin_auth_oauth.go +++ b/cmd/admin_auth_oauth.go @@ -4,6 +4,7 @@ package cmd import ( + "errors" "fmt" "net/url" @@ -193,7 +194,7 @@ func runAddOauth(c *cli.Context) error { func runUpdateOauth(c *cli.Context) error { if !c.IsSet("id") { - return fmt.Errorf("--id flag is missing") + return errors.New("--id flag is missing") } ctx, cancel := installSignals() |