mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 19:39:58 +00:00
TUN-9016: update go to 1.24
## Summary Update several moving parts of cloudflared build system: * use goboring 1.24.2 in cfsetup * update linter and fix lint issues * update packages namely **quic-go and net** * install script for macos * update docker files to use go 1.24.1 * remove usage of cloudflare-go * pin golang linter Closes TUN-9016
This commit is contained in:
40
vendor/google.golang.org/protobuf/internal/impl/validate.go
generated
vendored
40
vendor/google.golang.org/protobuf/internal/impl/validate.go
generated
vendored
@@ -37,6 +37,10 @@ const (
|
||||
|
||||
// ValidationValid indicates that unmarshaling the message will succeed.
|
||||
ValidationValid
|
||||
|
||||
// ValidationWrongWireType indicates that a validated field does not have
|
||||
// the expected wire type.
|
||||
ValidationWrongWireType
|
||||
)
|
||||
|
||||
func (v ValidationStatus) String() string {
|
||||
@@ -149,11 +153,23 @@ func newValidationInfo(fd protoreflect.FieldDescriptor, ft reflect.Type) validat
|
||||
switch fd.Kind() {
|
||||
case protoreflect.MessageKind:
|
||||
vi.typ = validationTypeMessage
|
||||
|
||||
if ft.Kind() == reflect.Ptr {
|
||||
// Repeated opaque message fields are *[]*T.
|
||||
ft = ft.Elem()
|
||||
}
|
||||
|
||||
if ft.Kind() == reflect.Slice {
|
||||
vi.mi = getMessageInfo(ft.Elem())
|
||||
}
|
||||
case protoreflect.GroupKind:
|
||||
vi.typ = validationTypeGroup
|
||||
|
||||
if ft.Kind() == reflect.Ptr {
|
||||
// Repeated opaque message fields are *[]*T.
|
||||
ft = ft.Elem()
|
||||
}
|
||||
|
||||
if ft.Kind() == reflect.Slice {
|
||||
vi.mi = getMessageInfo(ft.Elem())
|
||||
}
|
||||
@@ -195,9 +211,7 @@ func newValidationInfo(fd protoreflect.FieldDescriptor, ft reflect.Type) validat
|
||||
switch fd.Kind() {
|
||||
case protoreflect.MessageKind:
|
||||
vi.typ = validationTypeMessage
|
||||
if !fd.IsWeak() {
|
||||
vi.mi = getMessageInfo(ft)
|
||||
}
|
||||
vi.mi = getMessageInfo(ft)
|
||||
case protoreflect.GroupKind:
|
||||
vi.typ = validationTypeGroup
|
||||
vi.mi = getMessageInfo(ft)
|
||||
@@ -304,26 +318,6 @@ State:
|
||||
}
|
||||
if f != nil {
|
||||
vi = f.validation
|
||||
if vi.typ == validationTypeMessage && vi.mi == nil {
|
||||
// Probable weak field.
|
||||
//
|
||||
// TODO: Consider storing the results of this lookup somewhere
|
||||
// rather than recomputing it on every validation.
|
||||
fd := st.mi.Desc.Fields().ByNumber(num)
|
||||
if fd == nil || !fd.IsWeak() {
|
||||
break
|
||||
}
|
||||
messageName := fd.Message().FullName()
|
||||
messageType, err := protoregistry.GlobalTypes.FindMessageByName(messageName)
|
||||
switch err {
|
||||
case nil:
|
||||
vi.mi, _ = messageType.(*MessageInfo)
|
||||
case protoregistry.NotFound:
|
||||
vi.typ = validationTypeBytes
|
||||
default:
|
||||
return out, ValidationUnknown
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
// Possible extension field.
|
||||
|
Reference in New Issue
Block a user