You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
437 B

// +build docs
package main
import (
"os"
"strings"
"go.jolheiser.com/sip/cmd"
)
func main() {
app := cmd.NewApp("docs")
fi, err := os.Create("docs.md")
if err != nil {
panic(err)
}
md, err := app.ToMarkdown()
if err != nil {
panic(err)
}
// Clean up the header
md = md[strings.Index(md, "#"):]
if _, err := fi.WriteString(md); err != nil {
panic(err)
}
if err := fi.Close(); err != nil {
panic(err)
}
}