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.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.go')
-rw-r--r-- | cmd/admin_auth.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/admin_auth.go b/cmd/admin_auth.go index ec92e342d4..4777a92908 100644 --- a/cmd/admin_auth.go +++ b/cmd/admin_auth.go @@ -4,6 +4,7 @@ package cmd import ( + "errors" "fmt" "os" "text/tabwriter" @@ -91,7 +92,7 @@ func runListAuth(c *cli.Context) error { func runDeleteAuth(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() |