Go Documentation
Retrieve Go package documentation using go doc .
Workflow
-
Check go.mod for package version (use that version, or @latest if not found)
-
Fetch package if needed: go get package/path@version
-
Run go doc package/path or go doc package/path.Symbol
Key Flags
-
-src
-
Show source code
-
-all
-
Show all symbols in package
-
-u
-
Include unexported symbols