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.
19 lines
364 B
Go
19 lines
364 B
Go
3 years ago
|
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
|
||
|
}
|