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 FileLoader ¶
type FileLoader struct {
// contains filtered or unexported fields
}
FileLoader loads configuration layers from YAML, JSON and TOML configuration files.
func NewLoader ¶
func NewLoader(dirs ...string) *FileLoader
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.