update util.ReadFile to trim whitespace

This commit is contained in:
Alex Chao
2020-08-03 15:53:34 -04:00
parent b16265925a
commit 62dcb76a46
+4 -1
View File
@@ -5,6 +5,7 @@ import (
"log"
"path"
"runtime"
"strings"
)
/*
@@ -27,5 +28,7 @@ func ReadFile(pathFromCaller string) string {
if err != nil {
log.Fatal(err)
}
return string(content)
// trim off new lines at end of input files
strContent := string(content)
return strings.TrimSpace(strContent)
}