go-tools
go-tools copied to clipboard
Detect appending to a variadic argument
Please see https://go.dev/play/p/-ex0P0JLOV0 to demonstrate how modifying the variadic argument of a function can alter the memory of the caller. It's unlikely a caller of a function like this would expect this behavior, and it's unlikely the author of the function actually intends to cause this side effect, so it would be nice to have a checker that warns on this case.