Documentation ¶
Index ¶
- func DeepCollectChildren(source map[string]interface{}, path, key string) (map[string]interface{}, error)
- func DeepCollectParams(source map[string]interface{}, path, key string) (map[string]interface{}, error)
- func DeepCopyMap(m map[string]interface{}) (map[string]interface{}, error)
- func FormatByExtension(f string) string
- func GitClone(url, referenceName, path string, depth int, singleBranch bool) error
- func MarshallJSON(m interface{}) string
- func MarshallYaml(m interface{}) string
- func Merge(dst, src interface{}, overrideDstStringValues bool) interface{}
- func ReadFile(filename string) []byte
- func RemoveFromList(l []interface{}, item string) []interface{}
- func SearchMapWithPathPrefixes(source map[string]interface{}, path []string) interface{}
- func SearchMapWithPathStringPrefixes(source map[string]interface{}, path string) interface{}
- func StringListContains(s []string, e string) bool
- func UnmarshalByType(t string, stream []byte) (map[string]interface{}, error)
- func UnmarshalJSON(stream []byte) (map[string]interface{}, error)
- func UnmarshalYaml(stream []byte) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeepCollectChildren ¶
func DeepCollectChildren(source map[string]interface{}, path, key string) (map[string]interface{}, error)
DeepCollectChildren collects params from nesting structures For example: jobs.dev.jobs.install - to collect params from this structure pass path=dev.install and key=jobs.
func DeepCollectParams ¶
func DeepCopyMap ¶
DeepCopyMap performs a deep copy of the given map m.
func FormatByExtension ¶
func MarshallJSON ¶ added in v0.1.3
func MarshallJSON(m interface{}) string
func MarshallYaml ¶
func MarshallYaml(m interface{}) string
func Merge ¶
func Merge(dst, src interface{}, overrideDstStringValues bool) interface{}
TODO: Add merge for lists (initial arguments).
func RemoveFromList ¶
func RemoveFromList(l []interface{}, item string) []interface{}
func SearchMapWithPathPrefixes ¶
searchMapWithPathPrefixes recursively searches for a value for path in source map.
Taken from "viper". While searchMap() considers each path element as a single map key, this function searches for, and prioritizes, merged path elements. e.g., if in the source, "foo" is defined with a sub-key "bar", and "foo.bar" is also defined, this latter value is returned for path ["foo", "bar"].
This should be useful only at config level (other maps may not contain dots in their keys).
Note: This assumes that the path entries and map keys are lower cased.
func StringListContains ¶
func UnmarshalByType ¶
func UnmarshalJSON ¶ added in v0.1.3
func UnmarshalYaml ¶
Types ¶
This section is empty.