Documentation
¶
Overview ¶
This package provides functions to interact with configuration files.
Index ¶
- func GetValueForInlineYAML(key string, configData []byte, configStruct interface{}) (interface{}, string, error)
- func MergeWithDefault(defaultMap map[interface{}]interface{}, userMap map[interface{}]interface{}) map[interface{}]interface{}
- func YAMLInlineToConfig(configStoreKeyList, configStoreKeyTypeList []string) ([]byte, error)
- func YAMLInlineToStruct(structName string, configStoreKeyList, configStoreKeyTypeList []string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetValueForInlineYAML ¶ added in v0.0.6
func GetValueForInlineYAML(key string, configData []byte, configStruct interface{}) (interface{}, string, error)
GetValueForInlineYAML returns the value for a key in a nested map for the provided key
func MergeWithDefault ¶
func MergeWithDefault(defaultMap map[interface{}]interface{}, userMap map[interface{}]interface{}) map[interface{}]interface{}
MergeWithDefault merges a provided configuration with a provided default configuration.
If you have a user/app provided configuration that does not contain the full configuration, you can use this function to merge the user/app provided configuration with the default configuration.
func YAMLInlineToConfig ¶ added in v0.0.6
YAMLInlineToConfig converts an array of strings to a usable YAML formatted []byte
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.