Documentation ¶
Overview ¶
Package core provides functions to extract values from a set of yaml files after merging them.
Index ¶
- func Fill(keyPath string, conf interface{}, decoderConfig *mapstructure.DecoderConfig) error
- func FillValue(keyPath string, conf interface{}, out interface{}) bool
- func GetValue(conf interface{}, keyPath string) (interface{}, error)
- func ListToMap(l []interface{}) map[interface{}]interface{}
- func MergeValue(config interface{}, keyPath string, value interface{}, overwrite bool) error
- func SaveConf(config interface{}, file string) error
- func SetValue(config interface{}, keyPath string, value interface{}) error
- func ToKvMap(conf interface{}) map[string]string
- func Walk(callback func(key []string, value interface{}), conf interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fill ¶
func Fill(keyPath string, conf interface{}, decoderConfig *mapstructure.DecoderConfig) error
Fill will fill a according to DecoderConfig with the values from conf.
func GetValue ¶
GetValue returns the value at the indicated path. Paths are separated by the '/' character. The empty string or "/" will return conf itself.
func ListToMap ¶
func ListToMap(l []interface{}) map[interface{}]interface{}
ListToMap converts a list to an integer map.
func MergeValue ¶
MergeValue will merge the values from value into config at keyPath. If overwrite is true, values from value will overwrite existing values in config.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.