engine: util: Add a workaround for printing special resources
This let's our tests compare strings of interface fields!
This commit is contained in:
@@ -232,6 +232,19 @@ func ValueOf(v reflect.Value) (Value, error) {
|
||||
V: f,
|
||||
}, nil
|
||||
|
||||
// TODO: should this return a variant value?
|
||||
// TODO: add this into ConfigurableValueOf like ConfigurableTypeOf ?
|
||||
//case reflect.Interface:
|
||||
// t, err := TypeOf(value.Type())
|
||||
// if err != nil {
|
||||
// return nil, errwrap.Wrapf(err, "can't determine type of %+v", value)
|
||||
// }
|
||||
//
|
||||
// return &VariantValue{
|
||||
// T: NewType(?),
|
||||
// V: ?,
|
||||
// }, nil
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("unable to represent value of %+v which has kind: %v", v, kind)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user