gen_manpage.go
1// +build ignore
2
3package main
4
5import (
6 "fmt"
7 "github.com/MichaelMure/git-bug/commands"
8 "github.com/spf13/cobra/doc"
9 "log"
10 "os"
11 "path"
12)
13
14func main() {
15 cwd, _ := os.Getwd()
16 filepath := path.Join(cwd, "doc", "man")
17
18 header := &doc.GenManHeader{
19 Title: "MINE",
20 Section: "3",
21 }
22
23 fmt.Println("Generating manpage ...")
24
25 err := doc.GenManTree(commands.RootCmd, header, filepath)
26 if err != nil {
27 log.Fatal(err)
28 }
29}