As documented at http://tip.golang.org/doc/go1.6#reflect, the rules around
embedded unexported struct types containing exported fields are changing in Go
1.6. The same release notes explain how to change existing code, so do that.
This commit is contained in:
Michael Hudson-Doyle 2015-12-23 12:11:14 +13:00
Родитель f7716cbe52
Коммит 406cad6bb4
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -222,7 +222,7 @@ func getStructInfo(st reflect.Type) (*structInfo, error) {
inlineMap := -1
for i := 0; i != n; i++ {
field := st.Field(i)
if field.PkgPath != "" {
if field.PkgPath != "" && !field.Anonymous {
continue // Private field
}