Sort of like godocdown, but in reverse.
md-to-godoc takes markdown as input, and generates godoc-formatted package documentation.
Way, way alpha. Barebones. The minimalest.
Mostly here so we can see some code in godoc:
- This is a test
- And another test
func main() {
fmt.Println("Hello, world")
}
First, install the binary:
go get -u github.com/sectioneight/md-to-godoc
Then, run it on one or more packages. If you'd like to generate a doc.go
file
in the current package (that already has a README.md
), simply run
md-to-godoc
with no flags:
md-to-godoc
To generate doc.go
for all subpackages, you can do something like the
following:
find . -name README.md \
-not -path "./vendor/*" | \
xargs -I% md-to-godoc -input=%