This commit is contained in:
cdle
2023-06-08 10:59:14 +08:00
parent 99300e1588
commit 4b50aadfe0
+1 -1
View File
@@ -26,7 +26,7 @@ func getJsOs(vm *goja.Runtime, running func() bool) *goja.Object {
})
jsos.Set("readFileSync", func(path string) string {
// 读取文件内容
content, err := ioutil.ReadFile("example.txt")
content, err := ioutil.ReadFile(path)
if err != nil {
panic(Error(vm, err))
}