diff options
author | Unknwon <u@gogs.io> | 2015-08-27 23:06:14 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-27 23:06:14 +0800 |
commit | 23f42d92c917564435a00e8e75633b8056bd7b0d (patch) | |
tree | 6fed7f6df4c6b039e4e43eaae2fcd5788ddba3a0 /models/error.go | |
parent | fc2d0e5470fa2fea260adba30866acda1aa945cb (diff) | |
download | gitea-23f42d92c917564435a00e8e75633b8056bd7b0d.tar.gz gitea-23f42d92c917564435a00e8e75633b8056bd7b0d.zip |
add webhook recent deliveries
Diffstat (limited to 'models/error.go')
-rw-r--r-- | models/error.go | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/models/error.go b/models/error.go index 914aec8e79..a7c8f5def3 100644 --- a/models/error.go +++ b/models/error.go @@ -236,7 +236,27 @@ func IsErrRepoAlreadyExist(err error) bool { } func (err ErrRepoAlreadyExist) Error() string { - return fmt.Sprintf("repository already exists [uname: %d, name: %s]", err.Uname, err.Name) + return fmt.Sprintf("repository already exists [uname: %s, name: %s]", err.Uname, err.Name) +} + +// __ __ ___. .__ __ +// / \ / \ ____\_ |__ | |__ ____ ____ | | __ +// \ \/\/ // __ \| __ \| | \ / _ \ / _ \| |/ / +// \ /\ ___/| \_\ \ Y ( <_> | <_> ) < +// \__/\ / \___ >___ /___| /\____/ \____/|__|_ \ +// \/ \/ \/ \/ \/ + +type ErrWebhookNotExist struct { + ID int64 +} + +func IsErrWebhookNotExist(err error) bool { + _, ok := err.(ErrWebhookNotExist) + return ok +} + +func (err ErrWebhookNotExist) Error() string { + return fmt.Sprintf("webhook does not exist [id: %d]", err.ID) } // .___ |