aboutsummaryrefslogtreecommitdiffstats
path: root/models/branches.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-12-25 09:59:32 +0000
committerGitHub <noreply@github.com>2020-12-25 11:59:32 +0200
commita19447aed128ecadfcd938d6a80cd4951af1f4ce (patch)
tree6312bf946d601aab29731645a4777feeaea66036 /models/branches.go
parent04ae0f2f3f4556c6d0b4adc5f2cffd0cc7d25151 (diff)
downloadgitea-a19447aed128ecadfcd938d6a80cd4951af1f4ce.tar.gz
gitea-a19447aed128ecadfcd938d6a80cd4951af1f4ce.zip
migrate from com.* to alternatives (#14103)
* remove github.com/unknwon/com from models * dont use "com.ToStr()" * replace "com.ToStr" with "fmt.Sprint" where its easy to do * more refactor * fix test * just "proxy" Copy func for now * as per @lunny
Diffstat (limited to 'models/branches.go')
-rw-r--r--models/branches.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/models/branches.go b/models/branches.go
index 144767ee95..80df8c433e 100644
--- a/models/branches.go
+++ b/models/branches.go
@@ -16,7 +16,6 @@ import (
"code.gitea.io/gitea/modules/util"
"github.com/gobwas/glob"
- "github.com/unknwon/com"
)
// ProtectedBranch struct
@@ -483,7 +482,7 @@ func updateTeamWhitelist(repo *Repository, currentWhitelist, newWhitelist []int6
whitelist = make([]int64, 0, len(teams))
for i := range teams {
- if com.IsSliceContainsInt64(newWhitelist, teams[i].ID) {
+ if util.IsInt64InSlice(teams[i].ID, newWhitelist) {
whitelist = append(whitelist, teams[i].ID)
}
}