When trying to marshal field with custom type that has bytearray underneath (like datatypes.JSON from GORM) I get this:
interface conversion: interface {} is datatypes.JSON, not []uint8
Is this possible to do the same in aerospike-client?
Return bytes without type assertion seems quiet safe because (reflect.Value).Bytes says:
Bytes returns v's underlying value. It panics if v's underlying value is not a slice of bytes.
When trying to marshal field with custom type that has bytearray underneath (like datatypes.JSON from GORM) I get this:
interface conversion: interface {} is datatypes.JSON, not []uint8
In our mocks I replaced the following line: [/marshal.go](../marshal.go#L113)
with:
return f.Bytes()
And everything seems to work well.
Is this possible to do the same in aerospike-client? Return bytes without type assertion seems quiet safe because (reflect.Value).Bytes says:
Bytes returns v's underlying value. It panics if v's underlying value is not a slice of bytes.