mirror of
https://github.com/pikami/tiktok-dl.git
synced 2026-01-30 07:02:56 +00:00
Added more unit tests
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user