go-doc

Show documentation for a package or symbol.

TLDR

Show documentation for the current package

$ go doc
copy


Show package documentation and exported symbols
$ go doc [encoding/json]
copy


Show also documentation of symbols
$ go doc -all [encoding/json]
copy


Show also sources
$ go doc -all -src [encoding/json]
copy


Show a specific symbol
$ go doc -all -src [encoding/json.Number]
copy

Copied to clipboard