fix: fix the ApiTest error

This commit is contained in:
luhaoling 2024-03-06 16:07:25 +08:00
parent 31d1033a9c
commit e4844c149f

View File

@ -206,7 +206,7 @@ func batchGetCache2[T any, K comparable](
fns func(ctx context.Context, key K) (T, error), fns func(ctx context.Context, key K) (T, error),
) ([]T, error) { ) ([]T, error) {
if len(keys) == 0 { if len(keys) == 0 {
return nil, errs.ErrArgs.Wrap("groupID is empty") return nil, nil
} }
res := make([]T, 0, len(keys)) res := make([]T, 0, len(keys))
for _, key := range keys { for _, key := range keys {