argument b is overwritten before first use
82 return strings.Join(s[:], " ")
83}
84
85func swap(a, b int) (int, int) {86 temp := a
87 a = a
88 b = temp
Description
The function argument is overwritten before the passed value is read.
Bad practice
func (arg string) {
arg = "foo bar"
}
Recommended
func (arg string) {
use(arg)
arg = "foo bar"
}