зеркало из https://github.com/go-gitea/yaml.git
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.
This commit is contained in:
Родитель
f7716cbe52
Коммит
406cad6bb4
2
yaml.go
2
yaml.go
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче