Gotype命令未随Go一起安装?

i got Go 1.4 / Win32 from offsite. I see foder "c:\go\bin". No gotype command in it. I need gotype -- where is gotype, how to install it?

Update April 2015: Go 1.5 should introduce "go doc": see

Add the new go doc command to the go command, installed in the tool directory.

usage:

go doc [-u] [package|[package.]symbol[.method]]

Original answer (January 2015)

You would need:

go get -u golang.org/x/tools/cmd/gotype

That would install that extra tools from golang.org/x/tools/cmd/gotype:

The gotype command does syntactic and semantic analysis of Go files and packages like the front-end of a Go compiler.
Errors are reported if the analysis fails; otherwise gotype is quiet (unless -v is set).


Note: this isn't the only extra tool you might consider installing, as illustrated in this article:

go get -u golang.org/x/tools/cmd/godoc
go get -u golang.org/x/tools/cmd/vet
go get -u golang.org/x/tools/cmd/goimports
go get -u golang.org/x/tools/cmd/gorename
go get -u golang.org/x/tools/cmd/oracle
go get -u golang.org/x/tools/cmd/gotype
go get -u github.com/golang/lint/golint

Note: Go 1.5 will make that operation even faster.
See commit dc2d64b by Brad Fitzpatrick (bradfitz):

cmd/go: cache results of HTTP requests done during meta tag discovery

Previously, running

$ go get -u -v golang.org/x/tools/cmd/godoc

would results in dozens of HTTP requests for:

https://golang.org/x/tools?go-get=1

once per package under x/tools.

Now it caches the results.
We still end up doing one HTTP request for all the packages under x/tools, but this reduces the total number of HTTP requests in ~half.