mirror of https://github.com/go-redis/redis.git
feat: add encoding.BinaryUnmarshaler in Scan
This commit is contained in:
parent
e63669e170
commit
a47786a246
|
@ -109,6 +109,8 @@ func (s StructValue) Scan(key string, value string) error {
|
|||
return scan.ScanRedis(value)
|
||||
case encoding.TextUnmarshaler:
|
||||
return scan.UnmarshalText(util.StringToBytes(value))
|
||||
case encoding.BinaryUnmarshaler:
|
||||
return scan.UnmarshalBinary(util.StringToBytes(value))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue