fix scanner
This commit is contained in:
parent
9122c3078d
commit
10bb9a7d3c
3
main.go
3
main.go
|
@ -20,8 +20,7 @@ func main() {
|
||||||
|
|
||||||
func repl() {
|
func repl() {
|
||||||
scanner := bufio.NewScanner(os.Stdin)
|
scanner := bufio.NewScanner(os.Stdin)
|
||||||
for scanner.Scan() {
|
for fmt.Print("> "); scanner.Scan(); fmt.Print("> ") {
|
||||||
fmt.Print("> ")
|
|
||||||
line := scanner.Text()
|
line := scanner.Text()
|
||||||
if len(line) == 0 {
|
if len(line) == 0 {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue