github.com/defang-io/defang/src@v0.0.0-20240505002154-bdf411911834/cmd/gendocs/main.go (about) 1 package main 2 3 import ( 4 "os" 5 6 "github.com/defang-io/defang/src/cmd/cli/command" 7 "github.com/defang-io/defang/src/pkg/term" 8 "github.com/spf13/cobra/doc" 9 ) 10 11 // runs in docs ci to generate markdown docs 12 func main() { 13 if len(os.Args) < 2 { 14 panic("Missing required argument: docs path") 15 } 16 17 docsPath := os.Args[1] 18 19 _ = os.Mkdir(docsPath, 0755) 20 21 command.SetupCommands("") 22 23 err := doc.GenMarkdownTree(command.RootCmd, docsPath) 24 if err != nil { 25 term.Fatal(err) 26 } 27 }