Set and other Set function can't use custom type. e.g.
func TestI(t *testing.T) {
type myInt int
var i myInt = 123
err := rdb.Set(ctx, "key", i, 0).Err()
if err != nil {
t.Fatal(err)
}
}
result: redis: can't marshal * (implement encoding.BinaryMarshaler)
It should add rereflect assertion after type assertion. I did it for performance and other types of considerations. for examole: time.Time or encoding.BinaryMarshaler
Dear review: Thanks for your reviewing
Set and other Set function can't use custom type. e.g.
It should add rereflect assertion after type assertion. I did it for performance and other types of considerations. for examole:
time.Time
orencoding.BinaryMarshaler
Have a good day!
fixed: #3104