update vendor
This commit is contained in:
parent
824f46979b
commit
8675bc4b7a
328 changed files with 27166 additions and 6537 deletions
8
vendor/google.golang.org/protobuf/proto/merge.go
generated
vendored
8
vendor/google.golang.org/protobuf/proto/merge.go
generated
vendored
|
|
@ -21,7 +21,7 @@ import (
|
|||
// The unknown fields of src are appended to the unknown fields of dst.
|
||||
//
|
||||
// It is semantically equivalent to unmarshaling the encoded form of src
|
||||
// into dst with the UnmarshalOptions.Merge option specified.
|
||||
// into dst with the [UnmarshalOptions.Merge] option specified.
|
||||
func Merge(dst, src Message) {
|
||||
// TODO: Should nil src be treated as semantically equivalent to a
|
||||
// untyped, read-only, empty message? What about a nil dst?
|
||||
|
|
@ -59,6 +59,12 @@ func Clone(m Message) Message {
|
|||
return dst.Interface()
|
||||
}
|
||||
|
||||
// CloneOf returns a deep copy of m. If the top-level message is invalid,
|
||||
// it returns an invalid message as well.
|
||||
func CloneOf[M Message](m M) M {
|
||||
return Clone(m).(M)
|
||||
}
|
||||
|
||||
// mergeOptions provides a namespace for merge functions, and can be
|
||||
// exported in the future if we add user-visible merge options.
|
||||
type mergeOptions struct{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue