summaryrefslogtreecommitdiffstats
path: root/pkg/utils/utils.go
diff options
context:
space:
mode:
authorTommy Nguyen <remyabel@gmail.com>2018-08-19 08:48:03 -0400
committerTommy Nguyen <remyabel@gmail.com>2018-08-19 08:48:03 -0400
commit766197de9dd19fe743b21efe751c52db3e99aa3e (patch)
tree78ce80010057872348788760201612d553dea025 /pkg/utils/utils.go
parentd2bdac29aa7038177ab26f91c06d9f01703d97c5 (diff)
NormalizeLinefeeds removes rather than converts Window/Mac style lf's
Diffstat (limited to 'pkg/utils/utils.go')
-rw-r--r--pkg/utils/utils.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go
index 37e76d78a..f56ea8884 100644
--- a/pkg/utils/utils.go
+++ b/pkg/utils/utils.go
@@ -64,9 +64,10 @@ func TrimTrailingNewline(str string) string {
return str
}
+// NormalizeLinefeeds - Removes all Windows and Mac style line feeds
func NormalizeLinefeeds(str string) string {
- str = strings.Replace(str, "\r\n", "\n", -1)
- str = strings.Replace(str, "\r", "\n", -1)
+ str = strings.Replace(str, "\r\n", "", -1)
+ str = strings.Replace(str, "\r", "", -1)
return str
}