1
0
Fork 0
forked from forgejo/forgejo

Replace util.SliceXxx with slices.Xxx (#26958)

This commit is contained in:
CaiCandong 2023-09-07 17:37:47 +08:00 committed by GitHub
parent e97e883ad5
commit a78c2eae24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 46 additions and 110 deletions

View file

@ -6,6 +6,7 @@ package repo
import (
"context"
"fmt"
"slices"
"strings"
"code.gitea.io/gitea/models/db"
@ -176,7 +177,7 @@ func (cfg *ActionsConfig) ToString() string {
}
func (cfg *ActionsConfig) IsWorkflowDisabled(file string) bool {
return util.SliceContains(cfg.DisabledWorkflows, file)
return slices.Contains(cfg.DisabledWorkflows, file)
}
func (cfg *ActionsConfig) DisableWorkflow(file string) {