mirror of https://github.com/k3s-io/k3s
Better logging when a type is invalid during conversion
parent
9a998350f0
commit
9f15e96bd6
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue