Merge branch 'develop' of github.com:gogits/gogs into feature/milestone

# Conflicts:
#	gogs.go
#	models/issue.go
#	templates/.VERSION
This commit is contained in:
Unknwon 2015-08-05 20:26:00 +08:00
commit 2c507667bf
25 changed files with 242 additions and 157 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
}