You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type MacroEnabled struct{
When []string `yaml:"when"`
Unless []string `yaml:"unless"`
}
type BRAMBus_Ioctl struct {
MacroEnabled
Save bool `yaml:"save"`
}
When unmarshing data, the fields When and Unless do not get filled. Replacing the embedded struct by explicit fields fixes the problem:
type BRAMBus_Ioctl struct {
When []string `yaml:"when"`
Unless []string `yaml:"unless"`
Save bool `yaml:"save"`
}
Embedding structures has a number of advantes in Go, such as getting instantly the methods of the embedded structure. It would be nice to support this feature.
The text was updated successfully, but these errors were encountered:
When unmarshing data, the fields When and Unless do not get filled. Replacing the embedded struct by explicit fields fixes the problem:
Embedding structures has a number of advantes in Go, such as getting instantly the methods of the embedded structure. It would be nice to support this feature.
The text was updated successfully, but these errors were encountered: