Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct { // Errors is slice of non-critical errors of merge operations Errors []error // Replaced is describe replacements // Key is path in document like // "prop1.prop2.prop3" for object properties or // "arr1.1.prop" for arrays // Value is value of replacemet Replaced map[string]interface{} }
Info describes result of merge operation
func Merge ¶
func Merge(data, patch interface{}) (interface{}, *Info)
Merge merges patch document to data document
Returning merged document and merge info
func MergeBytes ¶
MergeBytes merges patch document buffer to data document buffer
Returning merged document buffer, merge info and error if any
func MergeBytesIndent ¶
func MergeBytesIndent(dataBuff, patchBuff []byte, prefix, indent string) (mergedBuff []byte, info *Info, err error)
MergeBytesIndent merges patch document buffer to data document buffer
Use prefix and indent for set indentation like in json.MarshalIndent ¶
Returning merged document buffer, merge info and error if any
Click to show internal directories.
Click to hide internal directories.