kevholditch/gokong

YAML support

Closed this issue · 0 comments

Hi,

I'm exporting/importing data using yaml.Marshal()/yaml.Unmarshal(), but the attributes are wrong. But, adding yaml in the struct declaration, fix it. Such as:

type Consumer struct {
	Id       string `json:"id,omitempty" yaml:"id,omitempty"`
	CustomId string `json:"custom_id,omitempty" yaml:"custom_id,omitempty"`
	Username string `json:"username,omitempty" yaml:"username,omitempty"`
}

Can I open a PR to fix it for all structs?