godoc
Go documentation server and viewer
TLDR
Start documentation server
$ godoc -http=:6060
Show package docs$ godoc [fmt]
Show specific function$ godoc [fmt Println]
Output HTML$ godoc -html [package]
SYNOPSIS
godoc [options] [package] [symbol]
DESCRIPTION
godoc extracts and generates documentation for Go packages. It can serve documentation as a web server or print to the console, providing browsable, searchable documentation.
The HTTP server mode indexes all packages in GOPATH/GOROOT for comprehensive browsing with source code links. For quick command-line lookups, the `go doc` subcommand is preferred.
PARAMETERS
PACKAGE
Package to document.SYMBOL
Symbol to look up.-http ADDR
Start HTTP server.-html
Output HTML format.-src
Show source code.--help
Display help information.
CAVEATS
Separate install since Go 1.12. Use go doc for quick lookups. Server mode for browsing.
HISTORY
godoc was the original Go documentation tool, now available separately from golang.org/x/tools/cmd/godoc.
