Przeglądaj źródła

Drop newline when reading input in REPL

Alois Mahdal 6 miesięcy temu
rodzic
commit
a97c81dc3a
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1
    1
      app/main.go

+ 1
- 1
app/main.go Wyświetl plik

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