Documentation ¶
Overview ¶
Package fileconf is configuration loader for the conf package. It loads configuration layers from YAML, JSON or TOML files. Configuration locators for this loader are relative pathes or glob patterns. See standart package path/filepath for more information about syntax of glob patterns. Here some examples:
file:myapp/dirs.yml file:myapp/servers.toml file:myapp/*.json file:myapp/*.*
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶ added in v2.0.2
type Loader struct {
// contains filtered or unexported fields
}
Loader loads configuration layers from YAML, JSON and TOML configuration files.
func NewLoader ¶
NewLoader method creates new loader instance. Method accepts a list of directories, in which the loader will search configuration files. The merge priority of loaded configuration layers depends on the order of directories. Layers loaded from rightmost directory have highest priority.