diff options
author | CaiCandong <50507092+CaiCandong@users.noreply.github.com> | 2023-09-07 17:37:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-07 09:37:47 +0000 |
commit | a78c2eae243077c1fed5f7b056c64072d3c63ac8 (patch) | |
tree | 53b63a8dafde117e76f5fede968e384ae55779b1 /models/git/protected_branch.go | |
parent | e97e883ad50774f249c8c694598c25a17227299b (diff) | |
download | gitea-a78c2eae243077c1fed5f7b056c64072d3c63ac8.tar.gz gitea-a78c2eae243077c1fed5f7b056c64072d3c63ac8.zip |
Replace `util.SliceXxx` with `slices.Xxx` (#26958)
Diffstat (limited to 'models/git/protected_branch.go')
-rw-r--r-- | models/git/protected_branch.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/git/protected_branch.go b/models/git/protected_branch.go index eef7e3935a..5ed1003749 100644 --- a/models/git/protected_branch.go +++ b/models/git/protected_branch.go @@ -7,6 +7,7 @@ import ( "context" "errors" "fmt" + "slices" "strings" "code.gitea.io/gitea/models/db" @@ -435,7 +436,7 @@ func updateTeamWhitelist(ctx context.Context, repo *repo_model.Repository, curre whitelist = make([]int64, 0, len(teams)) for i := range teams { - if util.SliceContains(newWhitelist, teams[i].ID) { + if slices.Contains(newWhitelist, teams[i].ID) { whitelist = append(whitelist, teams[i].ID) } } |