Clear commands when done; add case for no input
This commit is contained in:
parent
851dae2107
commit
97675ed9ec
8
main.go
8
main.go
@ -208,8 +208,12 @@ func main() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
println("\nI don't know how to open a", command[1]+"!")
|
println("\nI don't know how to open a", command[1]+"!")
|
||||||
|
case "":
|
||||||
|
println("\n What do you want me to do? ")
|
||||||
|
break
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
println("\nI don't know how to '", command[0], "'\n")
|
println("\nI don't know how to '", command[0], "'\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,5 +241,9 @@ func main() {
|
|||||||
quit = true
|
quit = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*Clear the commands in case the user just presses "enter"*/
|
||||||
|
|
||||||
|
command[0] = ""
|
||||||
|
command[1] = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user