better EOF handling in repl

master
Jordan Orelli 12 years ago
parent 926911a7c6
commit 101ee99edd

@ -337,7 +337,13 @@ func main() {
if prefix { if prefix {
fmt.Println("(prefix)") fmt.Println("(prefix)")
} }
if err != nil { switch err {
case nil:
break
case io.EOF:
fmt.Print("\n")
return
default:
fmt.Println("error: ", err) fmt.Println("error: ", err)
continue continue
} }

Loading…
Cancel
Save