diff options
| author | Joel Martin <github@martintribe.org> | 2014-10-04 19:53:11 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-10-04 19:53:11 -0500 |
| commit | 1ac751b20c8c6efe924737b0f88b9de6805bd5b4 (patch) | |
| tree | 2fb30d2034927d006399b52a811dde23bf33cb8d /go | |
| parent | ba782e2c5c3849bba6c63e4d5a6ea67ca185063b (diff) | |
| download | mal-1ac751b20c8c6efe924737b0f88b9de6805bd5b4.tar.gz mal-1ac751b20c8c6efe924737b0f88b9de6805bd5b4.zip | |
step0_repl.go: strip newline from input.
Diffstat (limited to 'go')
| -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 } |
