Change reflect.Ptr to reflect.Pointer

This commit is contained in:
21kyu
2022-06-26 01:23:43 +09:00
parent d2c5779dad
commit df168d5b5c
38 changed files with 70 additions and 70 deletions

View File

@@ -389,7 +389,7 @@ func collectResourcePaths(t *testing.T, resourcename string, path *field.Path, n
resourcename = strings.ToLower(resourcename)
resourcePaths := sets.NewString()
if tp.Kind() == reflect.Ptr {
if tp.Kind() == reflect.Pointer {
resourcePaths.Insert(collectResourcePaths(t, resourcename, path, name, tp.Elem()).List()...)
return resourcePaths
}
@@ -399,7 +399,7 @@ func collectResourcePaths(t *testing.T, resourcename string, path *field.Path, n
}
switch tp.Kind() {
case reflect.Ptr:
case reflect.Pointer:
resourcePaths.Insert(collectResourcePaths(t, resourcename, path, name, tp.Elem()).List()...)
case reflect.Struct:
// ObjectMeta is generic and therefore should never have a field with a specific resource's name;