Skip to content
Snippets Groups Projects
Commit e846b749 authored by renovate's avatar renovate
Browse files

Update module google.golang.org/protobuf to v1.28.1

parent 7ac02ad0
No related branches found
No related tags found
1 merge request!58Update module google.golang.org/protobuf to v1.28.1
Showing
with 153 additions and 89 deletions
This diff is collapsed.
This diff is collapsed.
...@@ -16,7 +16,8 @@ import ( ...@@ -16,7 +16,8 @@ import (
// MarshalOptions configures the marshaler. // MarshalOptions configures the marshaler.
// //
// Example usage: // Example usage:
// b, err := MarshalOptions{Deterministic: true}.Marshal(m) //
// b, err := MarshalOptions{Deterministic: true}.Marshal(m)
type MarshalOptions struct { type MarshalOptions struct {
pragma.NoUnkeyedLiterals pragma.NoUnkeyedLiterals
...@@ -101,7 +102,9 @@ func (o MarshalOptions) Marshal(m Message) ([]byte, error) { ...@@ -101,7 +102,9 @@ func (o MarshalOptions) Marshal(m Message) ([]byte, error) {
// otherwise it returns a non-nil empty buffer. // otherwise it returns a non-nil empty buffer.
// //
// This is to assist the edge-case where user-code does the following: // This is to assist the edge-case where user-code does the following:
//
// m1.OptionalBytes, _ = proto.Marshal(m2) // m1.OptionalBytes, _ = proto.Marshal(m2)
//
// where they expect the proto2 "optional_bytes" field to be populated // where they expect the proto2 "optional_bytes" field to be populated
// if any only if m2 is a valid message. // if any only if m2 is a valid message.
func emptyBytesForMessage(m Message) []byte { func emptyBytesForMessage(m Message) []byte {
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment