man.go
1//go:build mango
2// +build mango
3
4package main
5
6import (
7 "flag"
8 "fmt"
9 "os"
10
11 "github.com/muesli/mango"
12 mcobra "github.com/muesli/mango-cobra"
13 "github.com/muesli/roff"
14)
15
16func init() {
17 manPage := mcobra.NewManPage(1, rootCmd).
18 WithSection("Copyright", "(C) 2021-2022 Charmbracelet, Inc.\n"+
19 "Released under MIT license.")
20
21 fmt.Println(manPage.Build(roff.NewDocument()))
22 os.Exit(0)
23}