Commit 9f15e96b authored by Clayton Coleman's avatar Clayton Coleman

Better logging when a type is invalid during conversion

parent 9a998350
...@@ -116,7 +116,7 @@ func EnforcePtr(obj interface{}) (reflect.Value, error) { ...@@ -116,7 +116,7 @@ func EnforcePtr(obj interface{}) (reflect.Value, error) {
if v.Kind() == reflect.Invalid { 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 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() { if v.IsNil() {
return reflect.Value{}, fmt.Errorf("expected pointer, but got nil") return reflect.Value{}, fmt.Errorf("expected pointer, but got nil")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment