V8002. Variable is assigned to itself.
The analyzer detected a potential error related to a variable value assigned to itself.
The example:
type User struct {
name string
}
func (u *User) SetName (name string) {
name = name
}
The name parameter is assigned its own value, which is an error. To fix it, assign the parameter value to the u.name field instead:
func (u *User) SetName (name string) {
u.name = name
}