aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-03-30 19:52:45 +0100
committerGitHub <noreply@github.com>2020-03-30 21:52:45 +0300
commitbf847b9397b0365a81d1a2ca5386a6c4280d9e94 (patch)
treea902635a79aeb9442381d9d9741095b15a9e8721 /models
parent972b3bf3b0b772dd919333375356ae56e469ebea (diff)
downloadgitea-bf847b9397b0365a81d1a2ca5386a6c4280d9e94.tar.gz
gitea-bf847b9397b0365a81d1a2ca5386a6c4280d9e94.zip
Upgrade golangci-lint to 1.24.0 (#10894)
* upgrade golangci-lint to 1.24.0 to allow go 1.14 compatibility * fix golangci-lint errors * make make golangci-lint work when out of go-path Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'models')
-rw-r--r--models/error.go6
-rw-r--r--models/notification.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/models/error.go b/models/error.go
index a5b62b85ec..f53479fac8 100644
--- a/models/error.go
+++ b/models/error.go
@@ -227,7 +227,7 @@ func IsErrUserNotAllowedCreateOrg(err error) bool {
}
func (err ErrUserNotAllowedCreateOrg) Error() string {
- return fmt.Sprintf("user is not allowed to create organizations")
+ return "user is not allowed to create organizations"
}
// ErrReachLimitOfRepo represents a "ReachLimitOfRepo" kind of error.
@@ -561,7 +561,7 @@ func IsErrAccessTokenEmpty(err error) bool {
}
func (err ErrAccessTokenEmpty) Error() string {
- return fmt.Sprintf("access token is empty")
+ return "access token is empty"
}
// ________ .__ __ .__
@@ -1107,7 +1107,7 @@ func IsErrSHAOrCommitIDNotProvided(err error) bool {
}
func (err ErrSHAOrCommitIDNotProvided) Error() string {
- return fmt.Sprintf("a SHA or commmit ID must be proved when updating a file")
+ return "a SHA or commmit ID must be proved when updating a file"
}
// __ __ ___. .__ __
diff --git a/models/notification.go b/models/notification.go
index daf13faf87..0cee8616ca 100644
--- a/models/notification.go
+++ b/models/notification.go
@@ -611,7 +611,7 @@ func (nl NotificationList) LoadIssues() ([]int, error) {
// Without returns the notification list without the failures
func (nl NotificationList) Without(failures []int) NotificationList {
- if failures == nil || len(failures) == 0 {
+ if len(failures) == 0 {
return nl
}
remaining := make([]*Notification, 0, len(nl))