aboutsummaryrefslogtreecommitdiffstats
path: root/models/error.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-04-08 17:11:15 +0800
committerGitHub <noreply@github.com>2022-04-08 17:11:15 +0800
commit1dfa26e00e8e1ce6f6125335871da1d402a63466 (patch)
treed39414fb085ae52d6633ae9d064aabab2e7f75f8 /models/error.go
parent84ceaa98bd731431c7d3a7f65e59e7ad076a540f (diff)
downloadgitea-1dfa26e00e8e1ce6f6125335871da1d402a63466.tar.gz
gitea-1dfa26e00e8e1ce6f6125335871da1d402a63466.zip
Move milestone to models/issues/ (#19278)
* Move milestone to models/issues/ * Fix lint * Fix test * Fix lint * Fix lint
Diffstat (limited to 'models/error.go')
-rw-r--r--models/error.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/models/error.go b/models/error.go
index 6233b2ea85..6846bf8320 100644
--- a/models/error.go
+++ b/models/error.go
@@ -1048,33 +1048,6 @@ func (err ErrLabelNotExist) Error() string {
return fmt.Sprintf("label does not exist [label_id: %d]", err.LabelID)
}
-// _____ .__.__ __
-// / \ |__| | ____ _______/ |_ ____ ____ ____
-// / \ / \| | | _/ __ \ / ___/\ __\/ _ \ / \_/ __ \
-// / Y \ | |_\ ___/ \___ \ | | ( <_> ) | \ ___/
-// \____|__ /__|____/\___ >____ > |__| \____/|___| /\___ >
-// \/ \/ \/ \/ \/
-
-// ErrMilestoneNotExist represents a "MilestoneNotExist" kind of error.
-type ErrMilestoneNotExist struct {
- ID int64
- RepoID int64
- Name string
-}
-
-// IsErrMilestoneNotExist checks if an error is a ErrMilestoneNotExist.
-func IsErrMilestoneNotExist(err error) bool {
- _, ok := err.(ErrMilestoneNotExist)
- return ok
-}
-
-func (err ErrMilestoneNotExist) Error() string {
- if len(err.Name) > 0 {
- return fmt.Sprintf("milestone does not exist [name: %s, repo_id: %d]", err.Name, err.RepoID)
- }
- return fmt.Sprintf("milestone does not exist [id: %d, repo_id: %d]", err.ID, err.RepoID)
-}
-
// ____ ___ .__ .___
// | | \______ | | _________ __| _/
// | | /\____ \| | / _ \__ \ / __ |