Unverified Commit 9d81cc09 authored by Erik Sundell's avatar Erik Sundell Committed by Matthew Fisher
Browse files

toYaml - Fixes #3410 - trailing \n issue

`toYaml` utilized by `.Files` 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.

(cherry picked from commit 35132d14)
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
...@@ -175,7 +175,7 @@ func ToYaml(v interface{}) string { ...@@ -175,7 +175,7 @@ func ToYaml(v interface{}) string {
// Swallow errors inside of a template. // Swallow errors inside of a template.
return "" return ""
} }
return string(data) return strings.TrimSuffix(string(data), "\n")
} }
// FromYaml converts a YAML document into a map[string]interface{}. // FromYaml converts a YAML document into a map[string]interface{}.
......
Supports Markdown
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