Documentation ¶
Index ¶
- func WithPrefix(prefix string) func(*Options)
- type Options
- type Settings
- func FromFlatten(m map[string]string) (Settings, error)
- func Load(data []byte, ops ...func(*Options)) (Settings, error)
- func LoadFile(path string, ops ...func(*Options)) (Settings, error)
- func LoadFiles(paths []string, ops ...func(*Options)) (Settings, error)
- func LoadMultiple(datas [][]byte, ops ...func(*Options)) (Settings, error)
- func Merge(settings ...Settings) (Settings, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithPrefix ¶
WithPrefix adds the given prefix when loading settings
Types ¶
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options contains loading options for settings
type Settings ¶
type Settings map[string]interface{}
Settings represents a settings map
func FromFlatten ¶
FromFlatten takes a flatten map and loads it as a Settings map This uses yaml.Unmarshal to "guess" the type of the value
func LoadMultiple ¶
LoadMultiple loads multiple data in settings
Click to show internal directories.
Click to hide internal directories.