Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithOverwrite ¶
func WithOverwrite(dst interface{}, src interface{}) error
WithOverwrite encapsulates mergo's implementation of MergeWithOverwrite with our custom transformers.
Types ¶
type BoolTransformer ¶
type BoolTransformer struct{}
BoolTransformer will overwrite the behavior of merging boolean pointers such that a pointer to 'false' is not considered an empty value. Therefore, if the src's boolean pointer is not nil, it should overwrite the dst's boolean pointer value.
This is required because the default behavior of mergo is to treat a pointer to 'false' as an empty value, which prevents boolean fields to be set from 'true' to 'false' if needed.
func (BoolTransformer) Transformer ¶
Click to show internal directories.
Click to hide internal directories.