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 #332

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

bug report: pass []any as any in variadic function #332

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/7284783491?check_suite_focus=true

Error: /home/runner/work/asasalint/asasalint/atlas-app-toolkit/gateway/errors.go:271:38: pass []any as any to func NewWithFields func(message string, kvpairs ...interface{}) github.com/infobloxopen/atlas-app-toolkit/gateway.MessageWithFields
func WithCodedSuccess(ctx context.Context, c codes.Code, msg string, args ...interface{}) error {
	WithSuccess(ctx, NewWithFields(msg, args))
	return SetStatus(ctx, status.New(c, msg))
}

here the args will pass as []any{args...} into NewWithFields

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