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
I ran into some nil pointer bug which was caused by pattern like this.
func NewXXX(client Client, x X, y Y) *A {
return &A{
x: x,
y: y
}
}
The nil pointer was from code r.client.Foo(). That leads me to unparam which could've have reported I forgot to set client.
However, unparam recommended to rurn off -exported. I wonder whether we can turn on just those constructors like NewxXX.
How do you think?
The text was updated successfully, but these errors were encountered:
I ran into some nil pointer bug which was caused by pattern like this.
The nil pointer was from code
r.client.Foo()
. That leads me tounparam
which could've have reported I forgot to set client.However, unparam recommended to rurn off
-exported
. I wonder whether we can turn on just those constructors likeNewxXX
.How do you think?
The text was updated successfully, but these errors were encountered: