Added more unit tests

This commit is contained in:
Pijus Kamandulis
2020-01-22 01:06:35 +02:00
parent 6e0e39ada2
commit 1782a2f12b
5 changed files with 123 additions and 20 deletions

View File

@@ -1,6 +1,7 @@
package utils
import (
"io/ioutil"
"os"
)
@@ -19,3 +20,13 @@ func InitOutputDirectory(path string) {
os.MkdirAll(path, os.ModePerm)
}
}
// ReadFileToString - Reads file and returns content
func ReadFileToString(path string) string {
content, err := ioutil.ReadFile(path)
if err != nil {
panic(err)
}
return string(content)
}