瀏覽代碼

Update for Go 1.6 change to reflect

Gary Burd 10 年之前
父節點
當前提交
7ec56c98db
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      redis/scan.go

+ 1 - 1
redis/scan.go

@@ -259,7 +259,7 @@ func compileStructSpec(t reflect.Type, depth map[string]int, index []int, ss *st
 	for i := 0; i < t.NumField(); i++ {
 		f := t.Field(i)
 		switch {
-		case f.PkgPath != "":
+		case f.PkgPath != "" && !f.Anonymous:
 			// Ignore unexported fields.
 		case f.Anonymous:
 			// TODO: Handle pointers. Requires change to decoder and