Commit 6cdf6cee authored by Erik Sundell's avatar Erik Sundell

toYaml - Fixes #3470 - trailing \n issue

`toYaml` was introducing a new line. It is an issue since the new line is part of a functions output, it can't be whitespace chomped away so it would require a `trimSuffix "\n"` pipe. This commit trims one trailing `\n` from the toYaml output.
parent 35132d14
......@@ -36,7 +36,7 @@ func ToYAML(s string) (string, error) {
return "", err
}
d, err := yaml.Marshal(m)
return string(d), err
return strings.TrimSuffix(string(d), "\n"), err
}
// Parse parses a set line.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment