aboutsummaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-10-18 03:47:12 +0800
committerGitHub <noreply@github.com>2021-10-17 20:47:12 +0100
commit4a57c9ea17a86e579751025cd0a7c2e6de374726 (patch)
treed9de60079592c541c9e6f2a983ec754199739a2f /services
parent5326f4c9c59cce8a1d8f78afd486ebb8688b45ab (diff)
downloadgitea-4a57c9ea17a86e579751025cd0a7c2e6de374726.tar.gz
gitea-4a57c9ea17a86e579751025cd0a7c2e6de374726.zip
Fix some lints (#17337)
Fix some linting problems.
Diffstat (limited to 'services')
-rw-r--r--services/pull/check.go2
-rw-r--r--services/repository/push.go5
2 files changed, 4 insertions, 3 deletions
diff --git a/services/pull/check.go b/services/pull/check.go
index e819b09cf3..c55b177e1c 100644
--- a/services/pull/check.go
+++ b/services/pull/check.go
@@ -253,7 +253,7 @@ func CheckPrsForBaseBranch(baseRepo *models.Repository, baseBranchName string) e
// Init runs the task queue to test all the checking status pull requests
func Init() error {
- prQueue = queue.CreateUniqueQueue("pr_patch_checker", handle, "").(queue.UniqueQueue)
+ prQueue = queue.CreateUniqueQueue("pr_patch_checker", handle, "")
if prQueue == nil {
return fmt.Errorf("Unable to create pr_patch_checker Queue")
diff --git a/services/repository/push.go b/services/repository/push.go
index 4d86667539..ab1b404609 100644
--- a/services/repository/push.go
+++ b/services/repository/push.go
@@ -5,6 +5,7 @@
package repository
import (
+ "errors"
"fmt"
"time"
@@ -36,9 +37,9 @@ func handle(data ...queue.Data) {
}
func initPushQueue() error {
- pushQueue = queue.CreateQueue("push_update", handle, []*repo_module.PushUpdateOptions{}).(queue.Queue)
+ pushQueue = queue.CreateQueue("push_update", handle, []*repo_module.PushUpdateOptions{})
if pushQueue == nil {
- return fmt.Errorf("Unable to create push_update Queue")
+ return errors.New("unable to create push_update Queue")
}
go graceful.GetManager().RunWithShutdownFns(pushQueue.Run)