diff options
author | Unknwon <u@gogs.io> | 2017-03-12 00:47:34 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-03-12 00:47:34 -0500 |
commit | 05dbd3f7d78162bf06785faf0ea862fa2dc4f012 (patch) | |
tree | 2343371aff5f74df5ca48040357aa31ee37b68b5 /models/issue.go | |
parent | dee76e4189446d97040e8c715a811424bd91704c (diff) |
refactoring: experimental with models/errors package
Diffstat (limited to 'models/issue.go')
-rw-r--r-- | models/issue.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/issue.go b/models/issue.go index 8cf5add3..8bc5914c 100644 --- a/models/issue.go +++ b/models/issue.go @@ -5,7 +5,6 @@ package models import ( - "errors" "fmt" "strings" "time" @@ -16,6 +15,7 @@ import ( api "github.com/gogits/go-gogs-client" + "github.com/gogits/gogs/models/errors" "github.com/gogits/gogs/modules/base" "github.com/gogits/gogs/modules/setting" ) @@ -796,7 +796,7 @@ func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, uuids []string) func GetIssueByRef(ref string) (*Issue, error) { n := strings.IndexByte(ref, byte('#')) if n == -1 { - return nil, ErrMissingIssueNumber + return nil, errors.InvalidIssueReference{ref} } index, err := com.StrTo(ref[n+1:]).Int64() |