From 97675ed9ec9274f6772a11a3bc75022282c9668a Mon Sep 17 00:00:00 2001 From: Logen Kain Date: Sat, 3 Feb 2018 10:35:13 -0700 Subject: [PATCH] Clear commands when done; add case for no input --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.go b/main.go index a46ad77..0c58dce 100644 --- a/main.go +++ b/main.go @@ -208,8 +208,12 @@ func main() { } println("\nI don't know how to open a", command[1]+"!") + case "": + println("\n What do you want me to do? ") + break default: + println("\nI don't know how to '", command[0], "'\n") } @@ -237,5 +241,9 @@ func main() { quit = true } } + /*Clear the commands in case the user just presses "enter"*/ + + command[0] = "" + command[1] = "" } }