Documentation
¶
Overview ¶
Package manpage provides roff man page generation for cmdguard CLIs. It is an optional module — import it only when you need man page output, to keep your dependency tree lean.
Usage:
import (
v3 "github.com/larsartmann/cmdguard/v3/pkg/cmdguard/v3"
"github.com/larsartmann/cmdguard/manpage"
)
content, _ := manpage.Generate(cli, 1)
fmt.Println(content)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
Generate produces a roff man page for the CLI. Section is typically 1 for user commands or 8 for system commands.
func GenerateCommand ¶
GenerateCommand creates a cobra command that generates man pages. Add this as a subcommand to provide `myapp man` functionality.
func NewManPage ¶
NewManPage creates a mango man page from a cobra command. Useful for custom man page generation pipelines.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.