Go to file
jolheiser 359d89bc7d
Add alias support
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2022-09-03 21:32:49 -05:00
examples Add alias support 2022-09-03 21:32:49 -05:00
.gitignore Initial commit 2021-10-29 17:11:34 -05:00
LICENSE Initial commit 2021-10-29 17:11:34 -05:00
README.md Remove From 2021-10-31 16:04:40 -05:00
ffmd.go Add alias support 2022-09-03 21:32:49 -05:00
ffmd.tmpl Add alias support 2022-09-03 21:32:49 -05:00
go.mod Initial commit 2021-10-29 17:11:34 -05:00
go.sum Initial commit 2021-10-29 17:11:34 -05:00
tree.go Split examples and fix tree 2021-10-30 16:47:47 -05:00
tree_test.go Initial commit 2021-10-29 17:11:34 -05:00

README.md

ffmd

Go Reference

One of the things that I really liked about urfave/cli was that it could generate markdown docs for my commands.

With ffmd you can generate markdown docs for both flag.FlagSet and ffcli.Command (with any amount of sub-commands).

Check out examples for some sample generated docs.

Generate your docs

//go:build generate
// +build generate

package main

import (
	"os"
	
	"go.jolheiser.com/ffmd"
)

func main() {
	fi, err := os.Create("docs.md")
	if err != nil {
		panic(err)
    }
	defer fi.Close()

	// cmd is the ffcli.Command 
	md, err := ffmd.Command(cmd)
	if err != nil {
		panic(err)
    }
	
	if _, err := fi.WriteString(md); err != nil {
		panic(err)
    }
}

License

MIT