Golang documentation

From wikinotes
Revision as of 19:05, 23 July 2022 by Will (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation

standard library https://pkg.go.dev/std

go doc

Quickly refer to api docs on CLI

# list module docs/sigs (stdlib, internal)
go doc internal/logger
go doc io | bat -l go   # nicely syntax highlighted

godoc

Show website with apidocs -- standard library, used go modules, and your own package.

go install golang.org/x/tools/cmd/godoc@latest
godoc
open 'http://localhost:6060'