MCPcopy Create free account
hub / github.com/GetStream/stream-cli / run

Function run

cmd/gen-docs/main.go:20–37  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

18}
19
20func run(args []string) error {
21 fl := pflag.FlagSet{}
22 dir := fl.StringP("output", "o", "./docs", "Path directory where you want generate doc files")
23
24 if err := fl.Parse(args); err != nil {
25 return err
26 }
27
28 if _, err := os.Stat(*dir); os.IsNotExist(err) {
29 if err := os.MkdirAll(*dir, 0o755); err != nil {
30 return err
31 }
32 }
33
34 rootCmd := root.NewCmd()
35 rootCmd.DisableAutoGenTag = true
36 return doc.GenMarkdownTree(rootCmd, *dir)
37}

Callers 1

mainFunction · 0.85

Calls 1

NewCmdFunction · 0.92

Tested by

no test coverage detected