From 07584da73461b69043451ebe48fcac226202492a Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 24 Jan 2018 00:25:10 +0100 Subject: extract console, extract context --- cmd/j1e/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd/j1e/main.go') diff --git a/cmd/j1e/main.go b/cmd/j1e/main.go index 057e106..8f31aeb 100644 --- a/cmd/j1e/main.go +++ b/cmd/j1e/main.go @@ -6,10 +6,13 @@ import ( "context" "dim13.org/j1" + "dim13.org/j1/console" ) func main() { vm := j1.New() vm.LoadBytes(J1eBin) - vm.Run(context.Background()) + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + vm.Run(ctx, cancel, console.New(ctx)) } -- cgit v1.2.3