1
0
Fork 0
forked from forgejo/forgejo

allow anonymous SSH clone

This commit is contained in:
Unknwon 2015-08-05 11:14:17 +08:00
parent 487fc8ca39
commit e50982f5ec
20 changed files with 109 additions and 92 deletions

View file

@ -54,6 +54,20 @@ func (err ErrUserAlreadyExist) Error() string {
return fmt.Sprintf("user already exists: [name: %s]", err.Name)
}
type ErrUserNotExist struct {
UID int64
Name string
}
func IsErrUserNotExist(err error) bool {
_, ok := err.(ErrUserNotExist)
return ok
}
func (err ErrUserNotExist) Error() string {
return fmt.Sprintf("user does not exist: [uid: %d, name: %s]", err.UID, err.Name)
}
type ErrEmailAlreadyUsed struct {
Email string
}