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
At work, we figured out that go-jsonnet is not adding a new line at the end of a generated file, while jsonnet does.
This is somewhat of a problem as we use it in a CI pipeline and compare differences to the generated files, and sometimes people install jsonnet instead of go-jsonnet. It would be nice when go-jsonnet also adds the new line at the end of a generated file.
We create the files with the manifestYamlDoc function.
Reproducible example of the jsonnet file:
local workflows = {
'example.yaml': {
name:'example',
},
};
{
[filename]:
std.manifestYamlDoc(
workflows[filename],
indent_array_in_object=true,
quote_keys=false,
)
for filename instd.objectFields(workflows)
}
The text was updated successfully, but these errors were encountered:
sj14
changed the title
Go implementation not adding a new line to the file
Go implementation not adding a new line to generated yaml files
Mar 22, 2023
sj14
changed the title
Go implementation not adding a new line to generated yaml files
Go implementation missing a new line to generated yaml files
Mar 22, 2023
At work, we figured out that
go-jsonnet
is not adding a new line at the end of a generated file, whilejsonnet
does.This is somewhat of a problem as we use it in a CI pipeline and compare differences to the generated files, and sometimes people install
jsonnet
instead ofgo-jsonnet
. It would be nice whengo-jsonnet
also adds the new line at the end of a generated file.We create the files with the
manifestYamlDoc
function.Reproducible example of the jsonnet file:
And go-jsonnet is called like this:
jsonnet -S --multi ./output-folder ./input.jsonnet
The text was updated successfully, but these errors were encountered: