aboutsummaryrefslogtreecommitdiff
path: root/go/src/step7_quote
diff options
context:
space:
mode:
Diffstat (limited to 'go/src/step7_quote')
-rw-r--r--go/src/step7_quote/step7_quote.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/go/src/step7_quote/step7_quote.go b/go/src/step7_quote/step7_quote.go
index 4083354..68c2a85 100644
--- a/go/src/step7_quote/step7_quote.go
+++ b/go/src/step7_quote/step7_quote.go
@@ -1,15 +1,14 @@
package main
import (
- "bufio"
- //"io"
"fmt"
- "os"
"strings"
"errors"
+ "os"
)
import (
+ "readline"
. "types"
"reader"
"printer"
@@ -220,11 +219,9 @@ func main() {
os.Exit(0)
}
- rdr := bufio.NewReader(os.Stdin);
// repl loop
for {
- fmt.Print("user> ");
- text, err := rdr.ReadString('\n');
+ text, err := readline.Readline("user> ")
text = strings.TrimRight(text, "\n");
if (err != nil) {
return