summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-05-14 13:02:47 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-05-14 13:06:44 -0400
commit50105d7855f69190f235ebd50e261863905ef173 (patch)
tree650688610cfc1682e5cf580aa0a517b6bd60d127 /main.go
parent2da9893da33f05fd9122b6052c67eabcd570b0d5 (diff)
Use typescript
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/main.go b/main.go
index 71f296591..e634a6abe 100644
--- a/main.go
+++ b/main.go
@@ -50,11 +50,15 @@ func loadAsset(w *v8worker2.Worker, path string) {
func main() {
worker := v8worker2.New(recv)
loadAsset(worker, "dist/main.js")
- loadMsg := &Msg{
- Kind: Msg_LOAD,
- Argv: os.Args,
+ cwd, err := os.Getwd()
+ if err != nil {
+ panic(err)
}
- out, err := proto.Marshal(loadMsg)
+ out, err := proto.Marshal(&Msg{
+ Kind: Msg_START,
+ Cwd: cwd,
+ Argv: os.Args,
+ })
if err != nil {
panic(err)
}