Documentation
¶
Index ¶
- Constants
- func DeepMergeMaps(a, b map[string]interface{}) map[string]interface{}
- func FlattenMap(a, b map[string]interface{}, key string)
- func FromJSON(b []byte) (map[string]interface{}, error)
- func FromYAML(b []byte) (map[string]interface{}, error)
- func GetRootElement(m map[string]interface{}) (string, error)
- func HandleEnginePath(enginePath, path string) (string, string)
- func NormalizePath(path string) string
- func ParseEnvs(prefix string, i interface{}) error
- func RemoveCarriageReturns(s string) string
- func RemoveDuplicates(s []string) []string
- func RemoveExtension(file string) string
- func SortMapKeys(m map[string]interface{}) []string
- func SplitPath(path string) (string, string)
- func ToJSON(m interface{}) ([]byte, error)
- func ToMapStringInterface(i interface{}) map[string]interface{}
- func ToYAML(m interface{}) ([]byte, error)
- func UnflattenMap(path string, data map[string]interface{}, ignoreElements ...string) map[string]interface{}
- type Keys
Constants ¶
const (
// Delimiter / delimiter for splitting a path.
Delimiter = "/"
)
Variables ¶
This section is empty.
Functions ¶
func DeepMergeMaps ¶ added in v0.1.1
DeepMergeMaps takes two maps and deeply merges them together. https://stackoverflow.com/questions/62953360/golang-merge-deeply-two-maps/62954592#62954592
func FlattenMap ¶ added in v0.7.1
FlattenMap flattens a nested map into a single map with its.
func GetRootElement ¶ added in v0.8.0
func HandleEnginePath ¶ added in v0.1.1
HandleEnginePath handles the engine path if one is specified.
func NormalizePath ¶ added in v0.8.0
func RemoveCarriageReturns ¶ added in v0.2.0
RemoveCarriageReturns removes \r mostly used for unit tests on windows OS.
func RemoveDuplicates ¶ added in v0.2.0
RemoveDuplicates removes duplicate elements from a string slice.
func RemoveExtension ¶ added in v0.2.0
RemoveExtension removes the extension of a specified filename.
func SortMapKeys ¶
SortMapKeys sorts the keys of a map.
func SplitPath ¶ added in v0.0.4
SplitPath splits a given path by / and returns the first element and the joined rest paths.
func ToMapStringInterface ¶ added in v0.0.11
func ToMapStringInterface(i interface{}) map[string]interface{}
ToMapStringInterface takes any value and returns the map string interface.