Generate man pages from GoDoc comments
You can install godoc2man.
go install github.com/lufia/godoc2man@latest
godoc2man [options] [pkg ...]Or you can execute it directly.
go run github.com/lufia/godoc2man@latest [options] [pkg ...]- -lang: specify the language code that is used for GoDoc document
- -flag: generate options section from sources with static analysis
- -dir: specify the output directory
godoc2man generates all manuals under cmd directory.
godoc2man ./cmd/...