Documentation ¶
Index ¶
- func MergeJSON(message json.RawMessage, overrides map[string]interface{}) (json.RawMessage, error)
- func MergeMaps(originalMap, override map[string]interface{}) (map[string]interface{}, error)
- func MergeTwoYamls(originalYAMLFile string, overrideYAMLFile *string) ([]byte, error)
- func WriteYAMLFile(b []byte, path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeJSON ¶
func MergeJSON(message json.RawMessage, overrides map[string]interface{}) (json.RawMessage, error)
MergeJSON adds (or overrides if such keys exist) key/value data from `overrides` map into the `message` json.RawMessage and returns merged json data
func MergeMaps ¶
MergeMaps takes two maps with any value and merges it recursively. if the underlying value is also a map[string]interface{} it will replace only the values in that map but if the value is any other format, it will replace it with the override value
func MergeTwoYamls ¶
MergeTwoYamls reads the original yaml file and overrides the original file with the override file. This overriding will follow the rules in MergeMaps.
func WriteYAMLFile ¶
WriteYAMLFile takes a byte slice and writes to the path.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.