This commit is contained in:
cdle
2023-06-08 07:22:34 +08:00
parent bc96db7ba3
commit d9872f1ce5
3 changed files with 19 additions and 15 deletions
+3
View File
@@ -4,6 +4,7 @@ import (
"errors"
"os"
"path/filepath"
"runtime"
"github.com/dop251/goja"
)
@@ -41,5 +42,7 @@ func getJsOs(vm *goja.Runtime, running func() bool) *goja.Object {
}
return dir
})
jsos.Set("name", runtime.GOOS)
jsos.Set("arch", runtime.GOARCH)
return jsos
}