dumbdown command provides a simple conversion from
go doc to
During conversion, some not-needed text is omitted; while heading text is
## to become a markdown header.
The conversion is, by design, not particularly smart (hence the name).
Run from the command line:
go doc | dumbdown > README.md
To automatically build README.md, add "go:generate" comments to source:
//go:generate sh -c "go doc | dumbdown > README.md"
then at build-time run:
go generate ./...