aboutsummaryrefslogtreecommitdiffstats
path: root/models/error.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-10 13:13:16 +0800
committerGitHub <noreply@github.com>2021-11-10 13:13:16 +0800
commit33fca2b537d36cf998dd27425b2bb8ed5b0965f3 (patch)
tree817f392502e1c176a5cd7e80290520cb940a8416 /models/error.go
parentedbaa5d3f05b5ca397524587ba9db15edd61bc29 (diff)
downloadgitea-33fca2b537d36cf998dd27425b2bb8ed5b0965f3.tar.gz
gitea-33fca2b537d36cf998dd27425b2bb8ed5b0965f3.zip
Move webhook into models/webhook/ (#17579)
Diffstat (limited to 'models/error.go')
-rw-r--r--models/error.go44
1 files changed, 0 insertions, 44 deletions
diff --git a/models/error.go b/models/error.go
index 1179fa6eb7..b365a67b73 100644
--- a/models/error.go
+++ b/models/error.go
@@ -84,28 +84,6 @@ func (err ErrSSHDisabled) Error() string {
return "SSH is disabled"
}
-// ErrCancelled represents an error due to context cancellation
-type ErrCancelled struct {
- Message string
-}
-
-// IsErrCancelled checks if an error is a ErrCancelled.
-func IsErrCancelled(err error) bool {
- _, ok := err.(ErrCancelled)
- return ok
-}
-
-func (err ErrCancelled) Error() string {
- return "Cancelled: " + err.Message
-}
-
-// ErrCancelledf returns an ErrCancelled for the provided format and args
-func ErrCancelledf(format string, args ...interface{}) error {
- return ErrCancelled{
- fmt.Sprintf(format, args...),
- }
-}
-
// ____ ___
// | | \______ ___________
// | | / ___// __ \_ __ \
@@ -1309,28 +1287,6 @@ func (err ErrSHAOrCommitIDNotProvided) Error() string {
return "a SHA or commit ID must be proved when updating a file"
}
-// __ __ ___. .__ __
-// / \ / \ ____\_ |__ | |__ ____ ____ | | __
-// \ \/\/ // __ \| __ \| | \ / _ \ / _ \| |/ /
-// \ /\ ___/| \_\ \ Y ( <_> | <_> ) <
-// \__/\ / \___ >___ /___| /\____/ \____/|__|_ \
-// \/ \/ \/ \/ \/
-
-// ErrWebhookNotExist represents a "WebhookNotExist" kind of error.
-type ErrWebhookNotExist struct {
- ID int64
-}
-
-// IsErrWebhookNotExist checks if an error is a ErrWebhookNotExist.
-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)
-}
-
// .___
// | | ______ ________ __ ____
// | |/ ___// ___/ | \_/ __ \