Change reflect.Ptr to reflect.Pointer

Kubernetes-commit: df168d5b5c2dab7414fc00ead1a51257ec326a98
This commit is contained in:
21kyu 2022-06-26 01:23:43 +09:00 committed by Kubernetes Publisher
parent f9457a3787
commit a31219e583
1 changed files with 1 additions and 1 deletions

View File

@ -1050,7 +1050,7 @@ func AddObjectParams(ws *restful.WebService, route *restful.RouteBuilder, obj in
}
switch sf.Type.Kind() {
case reflect.Interface, reflect.Struct:
case reflect.Ptr:
case reflect.Pointer:
// TODO: This is a hack to let metav1.Time through. This needs to be fixed in a more generic way eventually. bug #36191
if (sf.Type.Elem().Kind() == reflect.Interface || sf.Type.Elem().Kind() == reflect.Struct) && strings.TrimPrefix(sf.Type.String(), "*") != "metav1.Time" {
continue