瀏覽代碼

Drop newline when reading input in REPL

Alois Mahdal 3 天之前
父節點
當前提交
a97c81dc3a
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      app/main.go

+ 1
- 1
app/main.go 查看文件

@@ -15,7 +15,7 @@ func getInput(ctx *core.Context) (string, error) {
15 15
 	if err != nil {
16 16
 		return "", err
17 17
 	}
18
-	return input, nil
18
+	return input[:len(input)-1], nil
19 19
 }
20 20
 
21 21
 func repl(ctx *core.Context) {