diff options
author | Přemysl Janouch <p@janouch.name> | 2018-10-10 20:59:35 +0200 |
---|---|---|
committer | Přemysl Janouch <p@janouch.name> | 2018-10-10 21:12:35 +0200 |
commit | 2fe3c4753fb790ad5ebde3fcbca056370ece9cb9 (patch) | |
tree | 484502b5b3d5673c395a454aacde8b62e6ef78a6 /cmd/repl | |
parent | 2717cd569bfa9eda3600ad4b9d88fc36eeda42e7 (diff) | |
download | ell-2fe3c4753fb790ad5ebde3fcbca056370ece9cb9.tar.gz ell-2fe3c4753fb790ad5ebde3fcbca056370ece9cb9.tar.xz ell-2fe3c4753fb790ad5ebde3fcbca056370ece9cb9.zip |
Go: make use of multiple return valuesslices
Diffstat (limited to 'cmd/repl')
-rw-r--r-- | cmd/repl/main.go | 3 |
1 files changed, 1 insertions, 2 deletions
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 { |