Documentation ¶
Overview ¶
Package uconfig provides advanced command line flags supporting defaults, env vars, and config structs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUsage = plugins.ErrUsage
View Source
var UsageOutput io.Writer = os.Stdout
UsageOutput is the io.Writer used by Usage message printer.
Functions ¶
Types ¶
type Config ¶
type Config interface { // Parse will call the parse method of all the added pluginss in the order // that the pluginss were registered, it will return early as soon as any // plugins fails. // You must call this before using the config value. Parse() error // Usage provides a simple usage message based on the meta data registered // by the pluginss. Usage() // FormattedUsage provides the config used in a desired format: env, yaml or json FormattedUsage(format string) }
Config is the config manager.
Directories ¶
Path | Synopsis |
---|---|
Package flat provides a flat view of an arbitrary nested structs.
|
Package flat provides a flat view of an arbitrary nested structs. |
internal
|
|
f
Package f provides simple test fixtures for uconfig.
|
Package f provides simple test fixtures for uconfig. |
Package plugins describes the uconfig provider interface.
|
Package plugins describes the uconfig provider interface. |
defaults
Package defaults provides flags support for uconfig
|
Package defaults provides flags support for uconfig |
env
Package env provides environment variables support for uconfig
|
Package env provides environment variables support for uconfig |
file
Package file provides config file support for uconfig
|
Package file provides config file support for uconfig |
flag
Package flag provides flags support for uconfig
|
Package flag provides flags support for uconfig |
secret
Package secret enable uconfig to integrate with secret plugins.
|
Package secret enable uconfig to integrate with secret plugins. |
Click to show internal directories.
Click to hide internal directories.