forked from toolshed/abra
build: go 1.24
We were running behind and there were quite some deprecations to update. This was mostly in the upstream copy/pasta package but seems quite minimal.
This commit is contained in:
24
vendor/google.golang.org/protobuf/internal/impl/validate.go
generated
vendored
24
vendor/google.golang.org/protobuf/internal/impl/validate.go
generated
vendored
@ -211,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)
|
||||
@ -320,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