Documentation ¶
Overview ¶
Package uconfig provides advanced command line flags supporting defaults, env vars, and config structs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config interface { // Visitor adds a visitor plugin, Config invokes the plugins Visit method // right away with a flat view of the underlying config struct. Visitor(Visitor) error // Walker adds a walker plugin, Config invokes the plugins Walk method // right away with the underlying config struct. Walker(Walker) error // Must be called after Visitor and Walkers are added. // Parse will call the parse method of all the added plugins in the order // that the plugins were registered, it will return early as soon as any // plugin fails. Parse() error // Usage provides a simple usage message based on the meta data registered // by the plugins. Usage() }
Config is the config manager.
type Files ¶
Files represents a set of file paths and the appropriate unmarshal function for the given file.
type Plugin ¶
type Plugin interface {
Parse() error
}
Plugin is the common interface for all plugins.
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. |
plugins
|
|
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 |
Click to show internal directories.
Click to hide internal directories.