1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Upgrade xorm to v1.0.2 (#11900)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
Lunny Xiao
2020-06-16 04:46:01 +08:00
committed by GitHub
parent 492b7d6357
commit cdef92b3ff
43 changed files with 815 additions and 761 deletions

View File

@@ -51,6 +51,7 @@ func WeightRandomPolicy(weights []int) GroupPolicyHandler {
}
}
// RoundRobinPolicy returns a group policy handler
func RoundRobinPolicy() GroupPolicyHandler {
var pos = -1
var lock sync.Mutex
@@ -68,6 +69,7 @@ func RoundRobinPolicy() GroupPolicyHandler {
}
}
// WeightRoundRobinPolicy returns a group policy handler
func WeightRoundRobinPolicy(weights []int) GroupPolicyHandler {
var rands = make([]int, 0, len(weights))
for i := 0; i < len(weights); i++ {