go doc <package>

Show documentation for package or symbol

Arguments

NameDescription
package

Options

NameDescription
-allShow all the documentation for the package
-cRespect case when matching symbols
-cmdTreat a command (package main) like a regular package. Otherwise package main's exported symbols are hidden when showing the package's top-level documentation
-shortOne-line representation for each symbol
-srcShow the full source code for the symbol
-uShow documentation for unexported as well as exported symbols, methods, and fields