aboutsummaryrefslogtreecommitdiff
path: root/core.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-01-15 00:34:27 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-01-15 00:34:27 +0100
commit331e5c36b4721b20a18156505be74e123e58bb55 (patch)
treeb16e555fd9666e2c72aa360de5703c74a8f7e884 /core.go
parent3705ec154f2700d1b3c60ce56626cc520fb3e068 (diff)
expose context
Diffstat (limited to 'core.go')
-rw-r--r--core.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core.go b/core.go
index 5ffe7cb..32f37fb 100644
--- a/core.go
+++ b/core.go
@@ -54,8 +54,8 @@ func (c *Core) LoadFile(fname string) error {
}
// Run evaluates content of memory
-func (c *Core) Run() {
- ctx, cancel := context.WithCancel(context.Background())
+func (c *Core) Run(ctx context.Context) {
+ ctx, cancel := context.WithCancel(ctx)
c.tty = NewConsole(ctx)
c.stop = cancel
for {