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
Run the godoc tool on a file such as http://play.golang.org/p/fnp9JT3Ki_.
The constants with types on the left of "=" are grouped with the type. The
equivalent constants with types on the right are not.
Since the two styles of declaration produce equivalent constants, they should arguably
also produce equivalent documentation.
The text was updated successfully, but these errors were encountered:
Types are trivially recognizable in declarations of the form
const c T = x
That is not the case in general for declarations of the form
const c = x
(note that x may have a type).
We can probably use a heuristic to handle cases like
const c = T(x)
but the general case requires type-checking the package.
rsc
changed the title
cmd/godoc: "const" declarations with type on right are not grouped with the type
x/tools/cmd/godoc: "const" declarations with type on right are not grouped with the type
Apr 14, 2015
The text was updated successfully, but these errors were encountered: