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
type Basic struct {
// contains filtered or unexported fields
}
It seems somewhat inconsistent that godoc would hide unexported fields from the Basic type description, but then show the values used to initialize them within Typ. It's not legal for users to write types.Basic{types.Invalid, 0, "invalid type"}.
The text was updated successfully, but these errors were encountered:
In general godoc shows the initializers unmodified. It is up to the code author to put something useful there (or not). In this case if the definition of Typ should be hidden then the idiom is
var Typ [...]*Basic = basicTypes
var basicTypes = [...]*Basic{...}
http://tip.golang.org/pkg/go/types/#pkg-variables:
http://tip.golang.org/pkg/go/types/#Basic:
It seems somewhat inconsistent that godoc would hide unexported fields from the Basic type description, but then show the values used to initialize them within Typ. It's not legal for users to write
types.Basic{types.Invalid, 0, "invalid type"}
.The text was updated successfully, but these errors were encountered: