bbgo/cmd/update-doc/main.go

20 lines
351 B
Go
Raw Normal View History

package main
import (
"fmt"
"git.qtrade.icu/lychiyu/bbgo/pkg/cmd"
"github.com/spf13/cobra/doc"
"log"
"path"
"runtime"
)
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)
}
}