From 33b354d83dd99090e4f946aa7a4adc68aba586da Mon Sep 17 00:00:00 2001 From: Leihb Date: Fri, 1 Jun 2018 19:06:59 +0800 Subject: [PATCH] handle Ctrl-D --- cmd/tile38-cli/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/tile38-cli/main.go b/cmd/tile38-cli/main.go index ff5893db..c8129aa0 100644 --- a/cmd/tile38-cli/main.go +++ b/cmd/tile38-cli/main.go @@ -375,6 +375,8 @@ func main() { } } else if err == liner.ErrPromptAborted { return + } else if err == io.EOF { + os.Exit(0) } else { fmt.Fprintf(os.Stderr, "Error reading line: %s", err.Error()) }