Skip to content

Make trailing newline behavior consistent with c++ version #518

@discordianfish

Description

@discordianfish

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions