INNER CODE UNIT · Go

main

stacklok/toolhive · cmd/help/main.go:49

func main() {
	var dir string
	root := &cobra.Command{
		Use:          "gendoc",
		Short:        "Generate ToolHive's help docs",
		SilenceUsage: true,
		Args:         cobra.NoArgs,
		RunE: func(*cobra.Command, []string) error {
			return doc.GenMarkdownTreeCustom(cli.NewRootCmd(false), dir, filePrepender, linkHandler)
		},
	}
	root.Flags().StringVarP(&dir, "dir", "d", "doc", "Path to directory in which to generate docs")
	if err := root.Execute(); err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…