Browse Source

Scan skip string when dest is nil

bits01 8 years ago
parent
commit
6492450c7a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      redis/scan.go

+ 2 - 0
redis/scan.go

@@ -187,6 +187,8 @@ func convertAssign(d interface{}, s interface{}) (err error) {
 		switch d := d.(type) {
 		case *string:
 			*d = string(s)
+		case nil:
+			// skip value
 		default:
 			err = cannotConvert(reflect.ValueOf(d), s)
 		}