Access documentation offline
suggest changeThe go doc command provides package documentation without a browser. For
example, inspect a package or a specific exported function with:
$ go doc fmt
$ go doc fmt.Print
To browse documentation locally, install and run the godoc web server:
$ go install golang.org/x/tools/cmd/godoc@latest
$ godoc -http=:9000
Then open localhost:9000 in a browser. The server documents the standard library and packages available in the current workspace.
Help for Go commands is also available at the command line:
$ go help [command]
For example, use go help build to read about go build.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents