Skip to content

Commit cc6f394

Browse files
committed
clarify comment
1 parent 2b9e1c4 commit cc6f394

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/hscan/hscan.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ func Struct(dst interface{}) (StructValue, error) {
6767

6868
// Scan scans the results from a key-value Redis map result set to a destination struct.
6969
// The Redis keys are matched to the struct's field with the `redis` tag.
70+
// This method will attempt to unmarshal each field and will return an error if any of the
71+
// fields cannot be unmarshalled. The destination struct will have the failed fields set to
72+
// their zero value.
7073
func Scan(dst interface{}, keys []interface{}, vals []interface{}) error {
7174
if len(keys) != len(vals) {
7275
return errors.New("args should have the same number of keys and vals")

0 commit comments

Comments
 (0)