From 2fe3c4753fb790ad5ebde3fcbca056370ece9cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Wed, 10 Oct 2018 20:59:35 +0200 Subject: Go: make use of multiple return values --- cmd/repl/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cmd/repl/main.go') diff --git a/cmd/repl/main.go b/cmd/repl/main.go index b1bb413..3511931 100644 --- a/cmd/repl/main.go +++ b/cmd/repl/main.go @@ -29,8 +29,7 @@ import ( ) func run(L *ell.Ell, program []ell.V) { - var result []ell.V - if !L.EvalBlock(program, nil, &result) { + if result, ok := L.EvalBlock(program, nil); !ok { fmt.Printf("\x1b[31m%s: %s\x1b[0m\n", "runtime error", L.Error) L.Error = "" } else { -- cgit v1.2.3