Documentation
¶
Overview ¶
Package program builds upon the Github packages knadh/koanf and urfave/cli/v3 to make it extremely simple to use the features of those two excellent packages in concert.
Every program using program will expose a standard set of command-line flags (--json, --log, --trace, --verbose) in addition to the standard flags provided by urfave/cli/v3 (--help and --version).
If a configuration struct is provided to the Run() function, then a further command=line flag (--config) is added to provide the source(s) of values for fields in the struct.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration interface {
Validate() error
}
Configuration is the interface for a configuration struct
type Option ¶
Option is a functional parameter for Run()
func WithConfiguration ¶
func WithConfiguration(config Configuration) Option
WithConfiguration is an Option helper to define a configuration structure that will be populated from the sources given on a --config command-line flag