Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MergeFunction ¶
type MergeFunction func(dst, src protoreflect.Message)
var ReplaceMergeFn MergeFunction = func(dst, src protoreflect.Message) { dst.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { dst.Clear(fd) return true }) src.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { dst.Set(fd, v) return true }) }
ReplaceMergeFn instead of merging all subfields one by one, takes src and set it to dest
type OptionFn ¶
type OptionFn func(options mergeOptions) mergeOptions
func MergeFunctionOptionFn ¶
func MergeFunctionOptionFn(name protoreflect.FullName, function MergeFunction) OptionFn
Click to show internal directories.
Click to hide internal directories.