tiktok-dl/utils/readFileAsString.go

13 lines
225 B
Go
Raw Normal View History

2020-01-19 02:11:53 +00:00
package utils
import (
"io/ioutil"
)
// ReadFileAsString - Returns contents of given file
func ReadFileAsString(fileName string) string {
content, err := ioutil.ReadFile(fileName)
CheckErr(err)
2020-01-19 02:11:53 +00:00
return string(content)
}