diff options
| -rw-r--r-- | go/step0_repl.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/go/step0_repl.go b/go/step0_repl.go index 6e559c9..601ef64 100644 --- a/go/step0_repl.go +++ b/go/step0_repl.go @@ -5,6 +5,7 @@ import ( //"io" "fmt" "os" + "strings" ) // read @@ -33,6 +34,7 @@ func main() { for { fmt.Print("user> "); text, err := reader.ReadString('\n'); + text = strings.TrimRight(text, "\n"); if (err != nil) { return } |
