Skip to content

Commit

Permalink
feat: add encoding.BinaryUnmarshaler in Scan
Browse files Browse the repository at this point in the history
  • Loading branch information
zeze1004 committed Oct 12, 2024
1 parent 7d56a2c commit 72cdd5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/hscan/structmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down

0 comments on commit 72cdd5c

Please sign in to comment.