// Clone returns a deep copy of a protocol buffer. func Clone(src Message) Message { … } type Merger … type generatedMerger … // Merge merges src into dst. // Required and optional fields that are set in src will be set to that value in dst. // Elements of repeated fields will be appended. // Merge panics if src and dst are not the same type, or if dst is nil. func Merge(dst, src Message) { … } func mergeStruct(out, in reflect.Value) { … } // mergeAny performs a merge between two values of the same type. // viaPtr indicates whether the values were indirected through a pointer (implying proto2). // prop is set if this is a struct field (it may be nil). func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) { … } func mergeExtension(out, in map[int32]Extension) { … }