Documentation ¶
Overview ¶
Package inserter provides some common inserter functions for mmdbwriter.Tree.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Func ¶
Func is a function that returns the data type to be inserted into an mmdbwriter.Tree using some conflict resolution strategy.
func DeepMergeWith ¶
DeepMergeWith creates an inserter that will recursively update an existing value. Map and Slice values will be merged recursively. Other values will be replaced by the new value.
func ReplaceWith ¶
ReplaceWith generates an inserter function that replaces the existing value with the new value.
func TopLevelMergeWith ¶
TopLevelMergeWith creates an inserter for Map values that will update an existing Map by adding the top-level keys and values from the new Map, replacing any existing values for the keys.
Both the new and existing value must be a Map. An error will be returned otherwise.
type FuncGenerator ¶
FuncGenerator is a function that generates an Func given a value.