From 331e5c36b4721b20a18156505be74e123e58bb55 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 15 Jan 2018 00:34:27 +0100 Subject: expose context --- cmd/eval/main.go | 8 ++++++-- cmd/j1e/main.go | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'cmd') diff --git a/cmd/eval/main.go b/cmd/eval/main.go index b9518f3..a5fa686 100644 --- a/cmd/eval/main.go +++ b/cmd/eval/main.go @@ -1,11 +1,15 @@ package main -import "dim13.org/j1" +import ( + "context" + + "dim13.org/j1" +) func main() { vm := j1.New() if err := vm.LoadFile("testdata/j1e.bin"); err != nil { panic(err) } - vm.Run() + vm.Run(context.Background()) } diff --git a/cmd/j1e/main.go b/cmd/j1e/main.go index 65cf626..057e106 100644 --- a/cmd/j1e/main.go +++ b/cmd/j1e/main.go @@ -2,10 +2,14 @@ package main //go:generate file2go -in ../../testdata/j1e.bin -import "dim13.org/j1" +import ( + "context" + + "dim13.org/j1" +) func main() { vm := j1.New() vm.LoadBytes(J1eBin) - vm.Run() + vm.Run(context.Background()) } -- cgit v1.2.3