diff options
author | Unknwon <u@gogs.io> | 2015-08-12 17:04:23 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-12 17:04:23 +0800 |
commit | b4c0b7b98b925eb470d361d9e90d0032770513ff (patch) | |
tree | 3bd4bd002ac5118d13f3e4b7f54dde4643041c23 /models/error.go | |
parent | b410207dc1f624f9c14a90de97b22634667d762e (diff) | |
download | gitea-b4c0b7b98b925eb470d361d9e90d0032770513ff.tar.gz gitea-b4c0b7b98b925eb470d361d9e90d0032770513ff.zip |
finish view issue without comments and ops
Diffstat (limited to 'models/error.go')
-rw-r--r-- | models/error.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/models/error.go b/models/error.go index 8fc0ba77fb..c3e4806361 100644 --- a/models/error.go +++ b/models/error.go @@ -239,6 +239,28 @@ func (err ErrRepoAlreadyExist) Error() string { return fmt.Sprintf("repository already exists [uname: %d, name: %s]", err.Uname, err.Name) } +// .___ +// | | ______ ________ __ ____ +// | |/ ___// ___/ | \_/ __ \ +// | |\___ \ \___ \| | /\ ___/ +// |___/____ >____ >____/ \___ > +// \/ \/ \/ + +type ErrIssueNotExist struct { + ID int64 + RepoID int64 + Index int64 +} + +func IsErrIssueNotExist(err error) bool { + _, ok := err.(ErrIssueNotExist) + return ok +} + +func (err ErrIssueNotExist) Error() string { + return fmt.Sprintf("issue does not exist [id: %d, repo_id: %d, index: %4]", err.ID, err.RepoID, err.Index) +} + // .____ ___. .__ // | | _____ \_ |__ ____ | | // | | \__ \ | __ \_/ __ \| | |