dcrwallet icon indicating copy to clipboard operation
dcrwallet copied to clipboard

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

Open alingse opened this issue 2 years ago • 0 comments

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

func (l logger) Println(args ...interface{}) {
	l.Info(stripGrpcPrefixArgs(args)...)
}

should be

func (l logger) Println(args ...interface{}) {
	l.Info(stripGrpcPrefixArgs(args...)...)
}

otherwise, the stripGrpcPrefixArgs will got []any{[]any{args...}}

😂 however this will not cause an error in runtime.

alingse avatar Jul 11 '22 17:07 alingse