engine: util: Add a workaround for printing special resources

This let's our tests compare strings of interface fields!
This commit is contained in:
James Shubin
2023-11-15 17:04:13 -05:00
parent 90d04990ca
commit 1c9fdc79c0
2 changed files with 28 additions and 1 deletions

View File

@@ -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)
}