mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 20:00:07 +00:00
Update staging/src/k8s.io/code-generator/cmd/validation-gen/validators/mode.go
Co-authored-by: Joe Betz <jpbetz@google.com>
This commit is contained in:
@@ -409,7 +409,7 @@ func (mtfv *modeTypeOrFieldValidator) getForbiddenValidation(t *types.Type) (any
|
||||
case types.Pointer:
|
||||
forbidden = types.Name{Package: libValidationPkg, Name: "ForbiddenPointer"}
|
||||
case types.Struct:
|
||||
return nil, fmt.Errorf("can only be used on pointers to structs")
|
||||
return nil, fmt.Errorf("modal member fields of struct type must be pointers")
|
||||
default:
|
||||
forbidden = types.Name{Package: libValidationPkg, Name: "ForbiddenValue"}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user