git-ea/ffmd.go

35 lines
425 B
Go
Raw Permalink Normal View History

//go:build generate
package main
import (
"os"
"go.jolheiser.com/git-ea/cmd"
"go.jolheiser.com/ffmd"
)
//go:generate go run ffmd.go
func main() {
c, err := cmd.New()
if err != nil {
panic(err)
}
docs, err := ffmd.Command(c)
if err != nil {
panic(err)
}
fi, err := os.Create("DOCS.md")
if err != nil {
panic(err)
}
defer fi.Close()
if _, err := fi.WriteString(docs); err != nil {
panic(err)
}
}