Hi,
it looks like the c++ version adds a newline to the end of the output (at least withj the --multi dir option) but the golang version does not. According to POSIX, a file should end with a newline so I'd suggest changing the go version to also include the newline:
Here is a diff for a file generated by c++, then re-generated by the go version:
--- a/tests/expected/deployment.yaml
+++ b/tests/expected/deployment.yaml
@@ -39,4 +39,4 @@
"volumes":
- "hostPath":
"path": "/data/minecraft"
- "name": "data"
+ "name": "data"
\ No newline at end of file