| Godoc guidelines from google: https://blog.golang.org/godoc-documenting-go-code Few different tools, primarily
and
. As of Go 1.12 "godoc no longer has a command-line interface and is only a web server. Users should use go doc for command-line help output instead." godoc is still useful to run a webserver to serve docs - for example to serve up docs for the go language libs, you can simply run
to serve docs on port 6060. For our use, to generate docs from our code, running the below should generate all docs for our go files (-all flag requires go v1.12):
cd $GOPATH/src/github.com/aerogear/mobile-security-service |
go doc -all ./...
|
For more granular control and only to generate godocs for specific packages/ methods:
Usage of [go] doc: |
go doc |
go doc <pkg> |
go doc <sym>[.<method>] |
go doc [<pkg>].<sym>[.<method>] |
go doc <pkg> <sym>[.<method>]
|
|