From 2fe3c4753fb790ad5ebde3fcbca056370ece9cb9 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch
Date: Wed, 10 Oct 2018 20:59:35 +0200 Subject: Go: make use of multiple return values --- cmd/interpreter/main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cmd/interpreter') diff --git a/cmd/interpreter/main.go b/cmd/interpreter/main.go index bd70af3..e0001a2 100644 --- a/cmd/interpreter/main.go +++ b/cmd/interpreter/main.go @@ -53,9 +53,7 @@ func main() { for i := 2; i < len(os.Args); i++ { args = append(args, *ell.NewString(os.Args[i])) } - - var result []ell.V - if !L.EvalBlock(program, args, &result) { + if _, ok := L.EvalBlock(program, args); !ok { fmt.Printf("%s: %s\n", "runtime error", L.Error) } } -- cgit v1.2.3-70-g09d2