mapstructure
type Person struct {
Family `mapstructure:",squash"` // embed
Location `mapstructure:",squash"`
Pref `mapstructure:",omitempty"`
FirstName string
Other map[string]interface{} `mapstructure:",remain"` // 其他剩余
}
type Person struct {
Family `mapstructure:",squash"` // embed
Location `mapstructure:",squash"`
Pref `mapstructure:",omitempty"`
FirstName string
Other map[string]interface{} `mapstructure:",remain"` // 其他剩余
}