From 26b0667b55c8b8279e3f4650d049bd75245ab39e Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 15 Jan 2018 00:11:33 +0100 Subject: rename to stop --- eval.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eval.go b/eval.go index b22012f..c879d7a 100644 --- a/eval.go +++ b/eval.go @@ -24,7 +24,7 @@ type J1 struct { d stack r stack console Console - cancel context.CancelFunc + stop context.CancelFunc } func New() *J1 { @@ -58,7 +58,7 @@ func (j1 *J1) LoadFile(fname string) error { func (j1 *J1) Run() { ctx, cancel := context.WithCancel(context.Background()) j1.console = NewConsole(ctx) - j1.cancel = cancel + j1.stop = cancel for { select { case <-ctx.Done(): @@ -86,7 +86,7 @@ func (j1 *J1) writeAt(addr, value uint16) { case 0xf000: // key j1.console.Write(value) case 0xf002: // bye - j1.cancel() + j1.stop() } } -- cgit v1.2.3