mirror of https://github.com/guggero/chantools
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
369 B
Go
20 lines
369 B
Go
package main
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
"github.com/spf13/cobra/doc"
|
|
)
|
|
|
|
func newDocCommand() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "doc",
|
|
Short: "Generate the markdown documentation of all commands",
|
|
Hidden: true,
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
return doc.GenMarkdownTree(rootCmd, "./doc")
|
|
},
|
|
}
|
|
|
|
return cmd
|
|
}
|