fix(lint): 修复 golangci-lint 报错
- 修复 gofmt 格式问题 - 修复 staticcheck SA4031 nil check 问题(只在成功时设置 release 函数) - 删除未使用的 sortAccountsByPriority 函数
This commit is contained in:
@@ -681,12 +681,6 @@ func (s *GatewayService) tryAcquireAccountSlot(ctx context.Context, accountID in
|
||||
return s.concurrencyService.AcquireAccountSlot(ctx, accountID, maxConcurrency)
|
||||
}
|
||||
|
||||
func sortAccountsByPriority(accounts []*Account) {
|
||||
sort.SliceStable(accounts, func(i, j int) bool {
|
||||
return accounts[i].Priority < accounts[j].Priority
|
||||
})
|
||||
}
|
||||
|
||||
func sortAccountsByPriorityAndLastUsed(accounts []*Account, preferOAuth bool) {
|
||||
sort.SliceStable(accounts, func(i, j int) bool {
|
||||
a, b := accounts[i], accounts[j]
|
||||
|
||||
Reference in New Issue
Block a user