Skip to content

Commit

Permalink
Merge pull request #152 from mwhudson/go16-compat
Browse files Browse the repository at this point in the history
Fix anonymous field handling for Go 1.6.
  • Loading branch information
niemeyer committed Mar 1, 2016
2 parents b667914 + 406cad6 commit a83829b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit a83829b

Please sign in to comment.