mirror of
https://github.com/pikami/tiktok-dl.git
synced 2026-01-22 19:22:55 +00:00
Initial commit
This commit is contained in:
15
utils/readFileAsString.go
Normal file
15
utils/readFileAsString.go
Normal file
@@ -0,0 +1,15 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user