1
0
mirror of https://gitea.com/jolheiser/sip synced 2024-11-26 07:33:48 +01:00
sip/docs.go
John Olheiser 5ecbcde518 Change to vanity URL (#37)
Fix YAML

New changes, generate docs, and add Drone for main

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Merge branch 'master' of gitea.com:jolheiser/sip into vanity

Change to vanity URL

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: jolheiser <john.olheiser@gmail.com>
Reviewed-on: https://gitea.com/jolheiser/sip/pulls/37
2020-09-21 19:21:07 +00:00

36 lines
437 B
Go

// +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)
}
}