Permalink
Browse files

make compatible with Go 1.6

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.
  • Loading branch information...
1 parent f7716cb commit 406cad6bb47dd7d9a123d005fb8ff766f6463051 @mwhudson mwhudson committed Dec 22, 2015
Showing with 1 addition and 1 deletion.
  1. +1 −1 yaml.go
View
@@ -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
}

0 comments on commit 406cad6

Please sign in to comment.