File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -56,18 +56,17 @@ func (gvk GVK) Validate() error {
56
56
if gvk .Version == "" {
57
57
return errors .New (versionRequired )
58
58
}
59
- errs := validation .IsDNS1123Subdomain (gvk .Version )
60
- if len (errs ) > 0 && gvk .Version != versionInternal {
59
+ if errs := validation .IsDNS1123Subdomain (gvk .Version ); len (errs ) > 0 && gvk .Version != versionInternal {
61
60
return fmt .Errorf ("Version must respect DNS-1123 (was %s)" , gvk .Version )
62
61
}
63
62
64
63
// Check if kind has a valid DNS1035 label value
65
64
if gvk .Kind == "" {
66
65
return errors .New (kindRequired )
67
66
}
68
- if errors := validation .IsDNS1035Label (strings .ToLower (gvk .Kind )); len (errors ) != 0 {
67
+ if errs := validation .IsDNS1035Label (strings .ToLower (gvk .Kind )); len (errs ) != 0 {
69
68
// NOTE: IsDNS1035Label returns a slice of strings instead of an error, so no wrapping
70
- return fmt .Errorf ("invalid Kind: %#v" , errors )
69
+ return fmt .Errorf ("invalid Kind: %#v" , errs )
71
70
}
72
71
73
72
// Require kind to start with an uppercase character
You can’t perform that action at this time.
0 commit comments