muesli/mango-cobra

cobra adapter for mango

40

stars

28

commits

Go

primary language

Dec 4, 2025

updated

README

mango-cobra

Latest Release Software License Build Status Go ReportCard Go Doc

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()))
}

Contributors

muesli

14 commits

dependabot[bot]

12 commits

caarlos0

1 commits

jon4hz

1 commits

muesli/mango-cobra

cobra adapter for mango

40

stars

28

commits

Go

primary language

Dec 4, 2025

updated

README

mango-cobra

Latest Release Software License Build Status Go ReportCard Go Doc

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()))
}

Contributors

muesli

14 commits

dependabot[bot]

12 commits

caarlos0

1 commits

jon4hz

1 commits

Languages

Go

100.0%