1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-14 22:47:21 +00:00

Resolve lint for unused parameter and unnecessary type arguments (#30750)

Resolve all cases for `unused parameter` and `unnecessary type
arguments`

Related: #30729

---------

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
Chongyi Zheng
2024-04-29 04:47:56 -04:00
committed by GitHub
parent ad4e902d5a
commit e80466f734
42 changed files with 112 additions and 130 deletions

View File

@ -527,7 +527,7 @@ func handlerBranchSync(items ...*BranchSyncOptions) []*BranchSyncOptions {
return nil
}
func addRepoToBranchSyncQueue(repoID, doerID int64) error {
func addRepoToBranchSyncQueue(repoID int64) error {
return branchSyncQueue.Push(&BranchSyncOptions{
RepoID: repoID,
})
@ -543,9 +543,9 @@ func initBranchSyncQueue(ctx context.Context) error {
return nil
}
func AddAllRepoBranchesToSyncQueue(ctx context.Context, doerID int64) error {
func AddAllRepoBranchesToSyncQueue(ctx context.Context) error {
if err := db.Iterate(ctx, builder.Eq{"is_empty": false}, func(ctx context.Context, repo *repo_model.Repository) error {
return addRepoToBranchSyncQueue(repo.ID, doerID)
return addRepoToBranchSyncQueue(repo.ID)
}); err != nil {
return fmt.Errorf("run sync all branches failed: %v", err)
}