bbgo_origin/cmd/update-doc/main.go
zenix 06e9450859 feature: add cmd document
add documentation index
2022-02-22 19:36:45 +09:00

20 lines
343 B
Go

package main
import (
"github.com/c9s/bbgo/pkg/cmd"
"github.com/spf13/cobra/doc"
"path"
"runtime"
"fmt"
"log"
)
func main() {
_, b, _, _ := runtime.Caller(0)
root := path.Join(path.Dir(path.Dir(path.Dir(b))), "doc", "commands")
fmt.Println(root)
if err := doc.GenMarkdownTree(cmd.RootCmd, root); err != nil {
log.Fatal(err)
}
}