.github
Bump actions/setup-go from 4 to 6example
Update example.gitignore
Initial import.golangci-soft.yml
chore: update golangci-lint configs & workflows.golangci.yml
chore: update golangci-lint configs & workflowsgo.mod
Bump github.com/spf13/pflag from 1.0.5 to 1.0.10go.sum
Bump github.com/spf13/pflag from 1.0.5 to 1.0.10LICENSE
Initial commitmpflag.go
Initial importREADME.md
docs: update README badgesmango-pflag
pflag adapter for mango.
Example
import (
"fmt"
"github.com/muesli/mango"
mpflag "github.com/muesli/mango-pflag"
"github.com/muesli/roff"
flag "github.com/spf13/pflag"
)
func main() {
flag.Parse()
manPage := mango.NewManPage(1, "mango", "a man-page generator").
WithLongDescription("mango is a man-page generator for Go.").
WithSection("Copyright", "(C) 2022 Christian Muehlhaeuser.\n"+
"Released under MIT license.")
flag.VisitAll(mpflag.PFlagVisitor(manPage))
fmt.Println(manPage.Build(roff.NewDocument()))
}