MCPcopy Create free account
hub / github.com/gogs/gogs / IsErrNameNotAllowed

Function IsErrNameNotAllowed

internal/database/users.go:1506–1509  ·  view source on GitHub ↗

IsErrNameNotAllowed returns true if the underlying error has the type ErrNameNotAllowed.

(err error)

Source from the content-addressed store, hash-verified

1504// IsErrNameNotAllowed returns true if the underlying error has the type
1505// ErrNameNotAllowed.
1506func IsErrNameNotAllowed(err error) bool {
1507 _, ok := errors.Cause(err).(ErrNameNotAllowed)
1508 return ok
1509}
1510
1511func (err ErrNameNotAllowed) Value() string {
1512 val, ok := err.args["name"].(string)

Callers 13

SignUpPostFunction · 0.92
SettingsPostFunction · 0.92
CreatePostFunction · 0.92
NewTeamPostFunction · 0.92
SettingsPostFunction · 0.92
ForkPostFunction · 0.92
handleCreateErrorFunction · 0.92
SettingsPostFunction · 0.92
CreateOrgForUserFunction · 0.92
CreateUserRepoFunction · 0.92
CreateUserFunction · 0.92
NewUserPostFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestIsUsernameAllowedFunction · 0.68