mirror of
https://github.com/pikami/tiktok-dl.git
synced 2026-11-11 20:52:15 +00:00
Added more unit tests
This commit is contained in:
1 parent
6e0e39ada2
commit
1782a2f12b
5 files changed
+122
-19
No files matched your search
@@ -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