Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyParams ¶ added in v1.2.0
func ApplyParams(p *Params)
ApplyParams applies CLI logging flags. Call at the start of every command.
func Run ¶ added in v1.2.0
Run executes a boa command without dumping cobra usage/help on error. boa.Cmd.Run always prints UsageString() before the error — including for runtime failures from RunFuncE — which dumps every config flag on crash. --help still works. Failures print "Error: ..." to stderr and exit 1.
Types ¶
type Params ¶
type Params struct {
ConfigFile string `configfile:"true" optional:"true" default:"/etc/dnsmgr2/dnsmgr2.yaml"`
Debug bool `descr:"Enable verbose debug logging" short:"d"`
Loglevel string `descr:"Set log level" alts:"error,warning,info,debug" default:"info"`
// Config is YAML-only. boa:"ignore" keeps nested slices such as
// dhcp.dns_servers from becoming required CLI flags (missing
// config-dhcpdns-servers) when the key is omitted; prefixes may
// supply per-subnet servers instead.
Config dnsmgr.ConfigRoot `yaml:",inline" boa:"ignore"`
}
Click to show internal directories.
Click to hide internal directories.