tiktok-dl/utils/readFileAsString.go
Pijus Kamandulis 69574dcb7e Initial commit
2020-01-19 04:11:53 +02:00

16 lines
254 B
Go

package utils
import (
"io/ioutil"
"log"
)
// ReadFileAsString - Returns contents of given file
func ReadFileAsString(fileName string) string {
content, err := ioutil.ReadFile(fileName)
if err != nil {
log.Fatal(err)
}
return string(content)
}