Readline repl for linux & osx

This commit is contained in:
obscuren
2014-05-17 15:15:46 +02:00
parent 2ac292dc7a
commit 770808ce0d
7 changed files with 122 additions and 39 deletions

20
ethereum/repl_windows.go Normal file
View File

@ -0,0 +1,20 @@
package main
import (
"bufio"
"fmt"
"os"
)
func (self *JSRepl) read() {
reader := bufio.NewReader(os.Stdin)
for {
fmt.Printf("eth >>> ")
str, _, err := reader.ReadLine()
if err != nil {
fmt.Println("Error reading input", err)
} else {
self.parseInput(string(str))
}
}
}