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 19, 2024
1 parent cc9bcb0 commit a5a0e2f
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 a5a0e2f

Please sign in to comment.