Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.9.0
type Config struct { SkipDefaults bool SkipFiles bool SkipEnvironment bool SkipFlags bool EnvPrefix string FlagPrefix string StopOnFileError bool Files []string FileDecoders map[string]FileDecoder }
Config to configure configuration loader.
type Field ¶ added in v0.4.0
type Field interface { // Name of the field. Name() string // DefaultValue of the field. DefaultValue() string // Usage of the field (set in `usage` tag). Usage() string // Tag returns a given tag for a field. Tag(tag string) string // Parent of the current node. Parent() (Field, bool) }
Field of the user configuration structure. Done as an interface to export less things in lib.
type FileDecoder ¶ added in v0.8.0
FileDecoder is used to read config from files. See aconfig submodules.
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader of user configuration.
func LoaderFor ¶ added in v0.2.1
LoaderFor creates a new Loader based on a given configuration structure.
func (*Loader) LoadWithFile ¶ added in v0.5.0
LoadWithFile configuration into a given param.
func (*Loader) WalkFields ¶ added in v0.4.0
WalkFields iterates over configuration fields. Easy way to create documentation or other stuff.
Directories
¶
Path | Synopsis |
---|---|
aconfigdotenv
module
|
|
aconfighcl
module
|
|
aconfigtoml
module
|
|
aconfigyaml
module
|
Click to show internal directories.
Click to hide internal directories.