You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which causes cannot use *values[i] (variable of type string) as *string value in argument to append values[i] should not be dereferenced.
The correct code is:
func (b *Foo ) WithBar(values ...*string) *Bar{
for i := range values {
if values[i] == nil {
panic("nil value passed to WithBar")
}
- b.Bar = append(b.Bar, *values[i])+ b.Bar = append(b.Bar, values[i])
}
return b
}
The text was updated successfully, but these errors were encountered:
For the following struct:
applyconfiguration-gen generate the following "With" function:
Which causes
cannot use *values[i] (variable of type string) as *string value in argument to append
values[i]
should not be dereferenced.The correct code is:
The text was updated successfully, but these errors were encountered: