Documentation
¶
Overview ¶
Package proto provides Protocol Buffer marshaling, unmarshaling, equality, and cloning helpers. Its marshaling and unmarshaling helpers support both v1 and v2 message interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneOf ¶ added in v0.22.0
func CloneOf[M Message](m M) M
CloneOf returns a deep copy of m, preserving m's concrete message type.
func Equal ¶
Equal reports whether two messages are equal, by recursively comparing the fields of the message.
func MarshalV1 ¶ added in v0.7.0
MarshalV1 returns the wire-format encoding of m. The provided message is a v1 message.
func Unmarshal ¶
Unmarshal parses the wire-format message in b and places the result in m. The provided message must be mutable (e.g., a non-nil pointer to a message).
func UnmarshalV1 ¶ added in v0.7.0
UnmarshalV1 parses the wire-format message in b and places the result in m. The provided message is a v1 message.
Types ¶
type MessageV1 ¶ added in v0.7.0
type MessageV1 = protoadapt.MessageV1