2019-06-04 22:58:42 +02:00

21 lines
367 B
Go

package cmd
import (
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
)
// docCmd represents the doc command
var docCmd = &cobra.Command{
Use: "doc",
Short: "Generate documentation",
Hidden: true,
RunE: func(cmd *cobra.Command, args []string) error {
return doc.GenMarkdownTree(rootCmd, "./docs")
},
}
func init() {
rootCmd.AddCommand(docCmd)
}