1
0
Fork 0
forked from forgejo/forgejo

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

(cherry picked from commit 9de443ced2c328d9b58a5e144a765f402aab859d)
This commit is contained in:
Cheng 2024-04-22 03:44:03 +08:00 committed by Earl Warren
parent de9d498109
commit 2ec0c5e284
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
10 changed files with 21 additions and 15 deletions

View file

@ -4,6 +4,7 @@
package cmd
import (
"errors"
"fmt"
"strings"
@ -42,7 +43,7 @@ var microcmdUserDelete = &cli.Command{
func runDeleteUser(c *cli.Context) error {
if !c.IsSet("id") && !c.IsSet("username") && !c.IsSet("email") {
return fmt.Errorf("You must provide the id, username or email of a user to delete")
return errors.New("You must provide the id, username or email of a user to delete")
}
ctx, cancel := installSignals()