mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Add scan struct example (#1870)
This commit is contained in:
committed by
GitHub
parent
989295a24b
commit
ed42d3c37b
@ -1008,12 +1008,12 @@ func (cmd *StringStringMapCmd) String() string {
|
||||
|
||||
// Scan scans the results from the map into a destination struct. The map keys
|
||||
// are matched in the Redis struct fields by the `redis:"field"` tag.
|
||||
func (cmd *StringStringMapCmd) Scan(dst interface{}) error {
|
||||
func (cmd *StringStringMapCmd) Scan(dest interface{}) error {
|
||||
if cmd.err != nil {
|
||||
return cmd.err
|
||||
}
|
||||
|
||||
strct, err := hscan.Struct(dst)
|
||||
strct, err := hscan.Struct(dest)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user