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