mirror of
https://github.com/mudler/luet.git
synced 2025-09-11 20:19:30 +00:00
Use goreleaser to build and release (#244)
Instead of using gox on one side and an action to release, we can merge them together with goreleaser which will build for extra targets (arm, mips if needed in the future) and it also takes care of creating checksums, a source archive, and a changelog and creating a release with all the artifacts. All binaries should respect the old naming convention, so any scripts out there should still work. Signed-off-by: Itxaka <igarcia@suse.com>
This commit is contained in:
23
vendor/google.golang.org/protobuf/proto/decode.go
generated
vendored
23
vendor/google.golang.org/protobuf/proto/decode.go
generated
vendored
@@ -9,6 +9,7 @@ import (
|
||||
"google.golang.org/protobuf/internal/encoding/messageset"
|
||||
"google.golang.org/protobuf/internal/errors"
|
||||
"google.golang.org/protobuf/internal/flags"
|
||||
"google.golang.org/protobuf/internal/genid"
|
||||
"google.golang.org/protobuf/internal/pragma"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/reflect/protoregistry"
|
||||
@@ -44,12 +45,14 @@ type UnmarshalOptions struct {
|
||||
}
|
||||
|
||||
// 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 Unmarshal(b []byte, m Message) error {
|
||||
_, err := UnmarshalOptions{}.unmarshal(b, m.ProtoReflect())
|
||||
return err
|
||||
}
|
||||
|
||||
// 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 (o UnmarshalOptions) Unmarshal(b []byte, m Message) error {
|
||||
_, err := o.unmarshal(b, m.ProtoReflect())
|
||||
return err
|
||||
@@ -115,10 +118,10 @@ func (o UnmarshalOptions) unmarshalMessageSlow(b []byte, m protoreflect.Message)
|
||||
// Parse the tag (field number and wire type).
|
||||
num, wtyp, tagLen := protowire.ConsumeTag(b)
|
||||
if tagLen < 0 {
|
||||
return protowire.ParseError(tagLen)
|
||||
return errDecode
|
||||
}
|
||||
if num > protowire.MaxValidNumber {
|
||||
return errors.New("invalid field number")
|
||||
return errDecode
|
||||
}
|
||||
|
||||
// Find the field descriptor for this field number.
|
||||
@@ -158,7 +161,7 @@ func (o UnmarshalOptions) unmarshalMessageSlow(b []byte, m protoreflect.Message)
|
||||
}
|
||||
valLen = protowire.ConsumeFieldValue(num, wtyp, b[tagLen:])
|
||||
if valLen < 0 {
|
||||
return protowire.ParseError(valLen)
|
||||
return errDecode
|
||||
}
|
||||
if !o.DiscardUnknown {
|
||||
m.SetUnknown(append(m.GetUnknown(), b[:tagLen+valLen]...))
|
||||
@@ -193,7 +196,7 @@ func (o UnmarshalOptions) unmarshalMap(b []byte, wtyp protowire.Type, mapv proto
|
||||
}
|
||||
b, n = protowire.ConsumeBytes(b)
|
||||
if n < 0 {
|
||||
return 0, protowire.ParseError(n)
|
||||
return 0, errDecode
|
||||
}
|
||||
var (
|
||||
keyField = fd.MapKey()
|
||||
@@ -212,21 +215,21 @@ func (o UnmarshalOptions) unmarshalMap(b []byte, wtyp protowire.Type, mapv proto
|
||||
for len(b) > 0 {
|
||||
num, wtyp, n := protowire.ConsumeTag(b)
|
||||
if n < 0 {
|
||||
return 0, protowire.ParseError(n)
|
||||
return 0, errDecode
|
||||
}
|
||||
if num > protowire.MaxValidNumber {
|
||||
return 0, errors.New("invalid field number")
|
||||
return 0, errDecode
|
||||
}
|
||||
b = b[n:]
|
||||
err = errUnknown
|
||||
switch num {
|
||||
case 1:
|
||||
case genid.MapEntry_Key_field_number:
|
||||
key, n, err = o.unmarshalScalar(b, wtyp, keyField)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
haveKey = true
|
||||
case 2:
|
||||
case genid.MapEntry_Value_field_number:
|
||||
var v protoreflect.Value
|
||||
v, n, err = o.unmarshalScalar(b, wtyp, valField)
|
||||
if err != nil {
|
||||
@@ -245,7 +248,7 @@ func (o UnmarshalOptions) unmarshalMap(b []byte, wtyp protowire.Type, mapv proto
|
||||
if err == errUnknown {
|
||||
n = protowire.ConsumeFieldValue(num, wtyp, b)
|
||||
if n < 0 {
|
||||
return 0, protowire.ParseError(n)
|
||||
return 0, errDecode
|
||||
}
|
||||
} else if err != nil {
|
||||
return 0, err
|
||||
@@ -271,3 +274,5 @@ func (o UnmarshalOptions) unmarshalMap(b []byte, wtyp protowire.Type, mapv proto
|
||||
// to the unknown field set of a message. It is never returned from an exported
|
||||
// function.
|
||||
var errUnknown = errors.New("BUG: internal error (unknown)")
|
||||
|
||||
var errDecode = errors.New("cannot parse invalid wire-format data")
|
||||
|
Reference in New Issue
Block a user