mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
style: replace interface{} with any per golangci-lint gofmt rewrite rules
This commit is contained in:
@@ -453,7 +453,7 @@ func (c *concurrencyCache) removeActiveIndexMembers(ctx context.Context, indexKe
|
||||
if len(members) == 0 {
|
||||
return
|
||||
}
|
||||
args := make([]interface{}, 0, len(members))
|
||||
args := make([]any, 0, len(members))
|
||||
for _, member := range members {
|
||||
args = append(args, member)
|
||||
}
|
||||
|
||||
@@ -217,8 +217,8 @@ func (c *userMsgQueueCache) ReconcileExpiredLockCandidates(ctx context.Context,
|
||||
}
|
||||
|
||||
// redisScriptInt64At 兼容 go-redis 对 Lua 数组元素的不同返回类型。
|
||||
func redisScriptInt64At(result interface{}, index int) (int64, error) {
|
||||
values, ok := result.([]interface{})
|
||||
func redisScriptInt64At(result any, index int) (int64, error) {
|
||||
values, ok := result.([]any)
|
||||
if !ok {
|
||||
return 0, fmt.Errorf("expected redis script array, got %T", result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user