mirror of
https://github.com/pikami/tiktok-dl.git
synced 2024-11-25 17:25:42 +00:00
16 lines
254 B
Go
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)
|
|
}
|