Considering the following snippet:
package example
type Foo interface {
}
var Alpha = "alpha"
var Beta string = "beta"
var Gamma Foo = "gamma"
Both godoc
(-http=:6060
) and go doc
ignore Gamma
entirely, whilst Alpha
and Beta
are - of course - shown in the output. This behavior seems to be reproducible with any exported variable that is declared to be an interface type.
Why?
Unconfirmed at my system. I see all, including Gamma.
Var Gamma is placed after type Foo definition.
But at my system a devel version of golang is installed:
go version devel +1140207a3395 Wed Nov 20 13:47:37 2013 -0800 linux/amd64