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
The default Unmarshal behaviour in yaml.v3 will only read and output the first document in a multi-document yaml file. I was unaware that this was possible, let alone common in Kubernetes so I did not test it initially.
The way to make yaml.v3 parse these properly is to to make a Decoder for the whole document, and decode them one at a time in a loop. This behaviour might diverge heavily from the basic formatter, so it might need to be an entirely new one, but I will see if I can make it work by default.
The text was updated successfully, but these errors were encountered:
braydonk
changed the title
Support Multiple Documents
Support multiple documents in single file
Aug 23, 2022
The default
Unmarshal
behaviour inyaml.v3
will only read and output the first document in a multi-document yaml file. I was unaware that this was possible, let alone common in Kubernetes so I did not test it initially.The way to make
yaml.v3
parse these properly is to to make aDecoder
for the whole document, and decode them one at a time in a loop. This behaviour might diverge heavily from the basic formatter, so it might need to be an entirely new one, but I will see if I can make it work by default.The text was updated successfully, but these errors were encountered: