comment
This commit is contained in:
parent
a44bf89437
commit
a05cf83a7b
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ import (
|
||||||
func (g *Game) REPL(src io.Reader, dst io.Writer, assets fs.FS) error {
|
func (g *Game) REPL(src io.Reader, dst io.Writer, assets fs.FS) error {
|
||||||
const prompt = "game> "
|
const prompt = "game> "
|
||||||
fmt.Fprint(dst, prompt)
|
fmt.Fprint(dst, prompt)
|
||||||
sc := bufio.NewScanner(src)
|
sc := bufio.NewScanner(src) // TODO: use a repl library?
|
||||||
for sc.Scan() {
|
for sc.Scan() {
|
||||||
argv := strings.Split(sc.Text(), " ")
|
argv := strings.Split(sc.Text(), " ")
|
||||||
if len(argv) == 0 {
|
if len(argv) == 0 {
|
||||||
|
|
Loading…
Reference in a new issue