mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 14:37:41 +02:00
Enable addtional linters (#34085)
enable mirror, usestdlibbars and perfsprint part of: https://github.com/go-gitea/gitea/issues/34083 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
1 parent
56e42be36d
commit
ee3c82f874
294 files changed
+848
-805
No files matched your search
@@ -5,7 +5,7 @@ package mirror
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"errors"
|
||||
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
@@ -29,7 +29,7 @@ func doMirrorSync(ctx context.Context, req *SyncRequest) {
|
||||
}
|
||||
}
|
||||
|
||||
var errLimit = fmt.Errorf("reached limit")
|
||||
var errLimit = errors.New("reached limit")
|
||||
|
||||
// Update checks and updates mirror repositories.
|
||||
func Update(ctx context.Context, pullLimit, pushLimit int) error {
|
||||
@@ -68,7 +68,7 @@ func Update(ctx context.Context, pullLimit, pushLimit int) error {
|
||||
// Check we've not been cancelled
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return fmt.Errorf("aborted")
|
||||
return errors.New("aborted")
|
||||
default:
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user