chore: upgrade dependencies and bump to go 1.22
This commit is contained in:
8
vendor/google.golang.org/protobuf/encoding/prototext/decode.go
generated
vendored
8
vendor/google.golang.org/protobuf/encoding/prototext/decode.go
generated
vendored
@ -21,7 +21,7 @@ import (
|
||||
"google.golang.org/protobuf/reflect/protoregistry"
|
||||
)
|
||||
|
||||
// Unmarshal reads the given []byte into the given proto.Message.
|
||||
// Unmarshal reads the given []byte into the given [proto.Message].
|
||||
// The provided message must be mutable (e.g., a non-nil pointer to a message).
|
||||
func Unmarshal(b []byte, m proto.Message) error {
|
||||
return UnmarshalOptions{}.Unmarshal(b, m)
|
||||
@ -51,7 +51,7 @@ type UnmarshalOptions struct {
|
||||
}
|
||||
}
|
||||
|
||||
// Unmarshal reads the given []byte and populates the given proto.Message
|
||||
// Unmarshal reads the given []byte and populates the given [proto.Message]
|
||||
// using options in the UnmarshalOptions object.
|
||||
// The provided message must be mutable (e.g., a non-nil pointer to a message).
|
||||
func (o UnmarshalOptions) Unmarshal(b []byte, m proto.Message) error {
|
||||
@ -739,7 +739,9 @@ func (d decoder) skipValue() error {
|
||||
case text.ListClose:
|
||||
return nil
|
||||
case text.MessageOpen:
|
||||
return d.skipMessageValue()
|
||||
if err := d.skipMessageValue(); err != nil {
|
||||
return err
|
||||
}
|
||||
default:
|
||||
// Skip items. This will not validate whether skipped values are
|
||||
// of the same type or not, same behavior as C++
|
||||
|
4
vendor/google.golang.org/protobuf/encoding/prototext/encode.go
generated
vendored
4
vendor/google.golang.org/protobuf/encoding/prototext/encode.go
generated
vendored
@ -33,7 +33,7 @@ func Format(m proto.Message) string {
|
||||
return MarshalOptions{Multiline: true}.Format(m)
|
||||
}
|
||||
|
||||
// Marshal writes the given proto.Message in textproto format using default
|
||||
// Marshal writes the given [proto.Message] in textproto format using default
|
||||
// options. Do not depend on the output being stable. It may change over time
|
||||
// across different versions of the program.
|
||||
func Marshal(m proto.Message) ([]byte, error) {
|
||||
@ -97,7 +97,7 @@ func (o MarshalOptions) Format(m proto.Message) string {
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// Marshal writes the given proto.Message in textproto format using options in
|
||||
// Marshal writes the given [proto.Message] in textproto format using options in
|
||||
// MarshalOptions object. Do not depend on the output being stable. It may
|
||||
// change over time across different versions of the program.
|
||||
func (o MarshalOptions) Marshal(m proto.Message) ([]byte, error) {
|
||||
|
28
vendor/google.golang.org/protobuf/encoding/protowire/wire.go
generated
vendored
28
vendor/google.golang.org/protobuf/encoding/protowire/wire.go
generated
vendored
@ -6,7 +6,7 @@
|
||||
// See https://protobuf.dev/programming-guides/encoding.
|
||||
//
|
||||
// For marshaling and unmarshaling entire protobuf messages,
|
||||
// use the "google.golang.org/protobuf/proto" package instead.
|
||||
// use the [google.golang.org/protobuf/proto] package instead.
|
||||
package protowire
|
||||
|
||||
import (
|
||||
@ -87,7 +87,7 @@ func ParseError(n int) error {
|
||||
|
||||
// ConsumeField parses an entire field record (both tag and value) and returns
|
||||
// the field number, the wire type, and the total length.
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
//
|
||||
// The total length includes the tag header and the end group marker (if the
|
||||
// field is a group).
|
||||
@ -104,8 +104,8 @@ func ConsumeField(b []byte) (Number, Type, int) {
|
||||
}
|
||||
|
||||
// ConsumeFieldValue parses a field value and returns its length.
|
||||
// This assumes that the field Number and wire Type have already been parsed.
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
// This assumes that the field [Number] and wire [Type] have already been parsed.
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
//
|
||||
// When parsing a group, the length includes the end group marker and
|
||||
// the end group is verified to match the starting field number.
|
||||
@ -164,7 +164,7 @@ func AppendTag(b []byte, num Number, typ Type) []byte {
|
||||
}
|
||||
|
||||
// ConsumeTag parses b as a varint-encoded tag, reporting its length.
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
func ConsumeTag(b []byte) (Number, Type, int) {
|
||||
v, n := ConsumeVarint(b)
|
||||
if n < 0 {
|
||||
@ -263,7 +263,7 @@ func AppendVarint(b []byte, v uint64) []byte {
|
||||
}
|
||||
|
||||
// ConsumeVarint parses b as a varint-encoded uint64, reporting its length.
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
func ConsumeVarint(b []byte) (v uint64, n int) {
|
||||
var y uint64
|
||||
if len(b) <= 0 {
|
||||
@ -384,7 +384,7 @@ func AppendFixed32(b []byte, v uint32) []byte {
|
||||
}
|
||||
|
||||
// ConsumeFixed32 parses b as a little-endian uint32, reporting its length.
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
func ConsumeFixed32(b []byte) (v uint32, n int) {
|
||||
if len(b) < 4 {
|
||||
return 0, errCodeTruncated
|
||||
@ -412,7 +412,7 @@ func AppendFixed64(b []byte, v uint64) []byte {
|
||||
}
|
||||
|
||||
// ConsumeFixed64 parses b as a little-endian uint64, reporting its length.
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
func ConsumeFixed64(b []byte) (v uint64, n int) {
|
||||
if len(b) < 8 {
|
||||
return 0, errCodeTruncated
|
||||
@ -432,7 +432,7 @@ func AppendBytes(b []byte, v []byte) []byte {
|
||||
}
|
||||
|
||||
// ConsumeBytes parses b as a length-prefixed bytes value, reporting its length.
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
func ConsumeBytes(b []byte) (v []byte, n int) {
|
||||
m, n := ConsumeVarint(b)
|
||||
if n < 0 {
|
||||
@ -456,7 +456,7 @@ func AppendString(b []byte, v string) []byte {
|
||||
}
|
||||
|
||||
// ConsumeString parses b as a length-prefixed bytes value, reporting its length.
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
func ConsumeString(b []byte) (v string, n int) {
|
||||
bb, n := ConsumeBytes(b)
|
||||
return string(bb), n
|
||||
@ -471,7 +471,7 @@ func AppendGroup(b []byte, num Number, v []byte) []byte {
|
||||
// ConsumeGroup parses b as a group value until the trailing end group marker,
|
||||
// and verifies that the end marker matches the provided num. The value v
|
||||
// does not contain the end marker, while the length does contain the end marker.
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
func ConsumeGroup(num Number, b []byte) (v []byte, n int) {
|
||||
n = ConsumeFieldValue(num, StartGroupType, b)
|
||||
if n < 0 {
|
||||
@ -495,8 +495,8 @@ func SizeGroup(num Number, n int) int {
|
||||
return n + SizeTag(num)
|
||||
}
|
||||
|
||||
// DecodeTag decodes the field Number and wire Type from its unified form.
|
||||
// The Number is -1 if the decoded field number overflows int32.
|
||||
// DecodeTag decodes the field [Number] and wire [Type] from its unified form.
|
||||
// The [Number] is -1 if the decoded field number overflows int32.
|
||||
// Other than overflow, this does not check for field number validity.
|
||||
func DecodeTag(x uint64) (Number, Type) {
|
||||
// NOTE: MessageSet allows for larger field numbers than normal.
|
||||
@ -506,7 +506,7 @@ func DecodeTag(x uint64) (Number, Type) {
|
||||
return Number(x >> 3), Type(x & 7)
|
||||
}
|
||||
|
||||
// EncodeTag encodes the field Number and wire Type into its unified form.
|
||||
// EncodeTag encodes the field [Number] and wire [Type] into its unified form.
|
||||
func EncodeTag(num Number, typ Type) uint64 {
|
||||
return uint64(num)<<3 | uint64(typ&7)
|
||||
}
|
||||
|
Reference in New Issue
Block a user