Releases: wework/yaml
Fix nil panic for Struct Meta
The previous release worked for its intended purpose of updating a yaml file in place. However if using the structs generate a new yaml file it panics when the StructMeta is nil because it is unsettable by users outside of unmarshalling yaml.
Now handles nil StructMeta gracefully.
Yaml with metadata
This release adds support for the yaml.StructMeta interface. By adding a field of type yaml.StructMeta to store metadata the relative positioning of fields as well as comments, the yaml package can now support update in place for structs.
This is a great boon when working on config files that are regularly checked into git as they will only display line changes for the changed field rather than reordering the entire document according to the ordering the fields appear on the struct.