mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 13:14:05 +00:00
Better logging when a type is invalid during conversion
This commit is contained in:
@@ -116,7 +116,7 @@ func EnforcePtr(obj interface{}) (reflect.Value, error) {
|
||||
if v.Kind() == reflect.Invalid {
|
||||
return reflect.Value{}, fmt.Errorf("expected pointer, but got invalid kind")
|
||||
}
|
||||
return reflect.Value{}, fmt.Errorf("expected pointer, but got %v type", v.Type().Name())
|
||||
return reflect.Value{}, fmt.Errorf("expected pointer, but got %v type", v.Type())
|
||||
}
|
||||
if v.IsNil() {
|
||||
return reflect.Value{}, fmt.Errorf("expected pointer, but got nil")
|
||||
|
Reference in New Issue
Block a user