README ¶ mango-cobra cobra adapter for mango. Example import ( "fmt" mcobra "github.com/muesli/mango-cobra" "github.com/muesli/roff" "github.com/spf13/cobra" ) var ( rootCmd = &cobra.Command{ Use: "mango", Short: "A man-page generator", } ) func main() { manPage, err := mcobra.NewManPage(1, rootCmd) if err != nil { panic(err) } manPage = manPage.WithSection("Copyright", "(C) 2022 Christian Muehlhaeuser.\n"+ "Released under MIT license.") fmt.Println(manPage.Build(roff.NewDocument())) } Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func AddCommand(m *mango.ManPage, c *cobra.Command) error func NewManPage(section uint, c *cobra.Command) (*mango.ManPage, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func AddCommand ¶ func AddCommand(m *mango.ManPage, c *cobra.Command) error AddCommand adds a cobra.Command to a mango.ManPage. func NewManPage ¶ func NewManPage(section uint, c *cobra.Command) (*mango.ManPage, error) NewManPageFromCobra creates a new mango.ManPage from a cobra.Command. Types ¶ This section is empty. Source Files ¶ View all Source files mcobra.go Directories ¶ Show internal Expand all Path Synopsis example Click to show internal directories. Click to hide internal directories.