Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug report: pass []any as any in variadic function redis.Mset #914

Open
alingse opened this issue Jul 11, 2022 · 0 comments
Open

bug report: pass []any as any in variadic function redis.Mset #914

alingse opened this issue Jul 11, 2022 · 0 comments

Comments

@alingse
Copy link

alingse commented Jul 11, 2022

i am writing a linter to lint that pass []any as any in variadic function

and run github Actions for some top go packages, this package failed

see github actions lint result here https://github.com/alingse/asasalint/runs/7284812036?check_suite_focus=true

Error: /home/runner/work/asasalint/asasalint/gosoline/pkg/kvstore/redis.go:195:17: pass []any as any to func MSet func(ctx context.Context, values ...interface{}) *github.com/go-redis/redis/v8.StatusCmd
func (s *redisKvStore) flushChunk(ctx context.Context, pairs []interface{}) error {
	if len(pairs) < 1 {
		return nil
	}

	pipe := s.client.Pipeline().TxPipeline()
	pipe.MSet(ctx, pairs)

should be

	pipe.MSet(ctx, pairs...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant