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 {
5656 if gvk .Version == "" {
5757 return errors .New (versionRequired )
5858 }
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 {
6160 return fmt .Errorf ("Version must respect DNS-1123 (was %s)" , gvk .Version )
6261 }
6362
6463 // Check if kind has a valid DNS1035 label value
6564 if gvk .Kind == "" {
6665 return errors .New (kindRequired )
6766 }
68- if errors := validation .IsDNS1035Label (strings .ToLower (gvk .Kind )); len (errors ) != 0 {
67+ if errs := validation .IsDNS1035Label (strings .ToLower (gvk .Kind )); len (errs ) != 0 {
6968 // 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 )
7170 }
7271
7372 // Require kind to start with an uppercase character
You can’t perform that action at this time.
0 commit comments