7 "github.com/spf13/cobra"
8 "github.com/spf13/cobra/doc"
11 func ExampleGenManTree() {
12 cmd := &cobra.Command{
14 Short: "my test program",
16 header := &doc.GenManHeader{
20 doc.GenManTree(cmd, header, "/tmp")
23 func ExampleGenMan() {
24 cmd := &cobra.Command{
26 Short: "my test program",
28 header := &doc.GenManHeader{
32 out := new(bytes.Buffer)
33 doc.GenMan(cmd, header, out)
34 fmt.Print(out.String())