diff options
author | Joop Kiefte <ikojba@gmail.com> | 2023-09-28 01:39:01 +0100 |
---|---|---|
committer | Joop Kiefte <ikojba@gmail.com> | 2023-09-28 01:39:01 +0100 |
commit | 0f66418788c708da0f13915ac6e0b83c81d5c256 (patch) | |
tree | c3e4705445cace461abf3c1280a70741767a76ee | |
parent | 9541cf3832bc32bdc120a6412657cff99243d1f1 (diff) |
Correct reset loop semantics
-rw-r--r-- | main.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -45,8 +45,6 @@ Running debby with any other arguments will run it as a dolt command.` fmt.Println(str) return } - } else { - choice = 0 } // Menu loop. 1. Read tale names 2. Run query 3. Run and save query 4. Execute Dolt command 5. Exit @@ -88,6 +86,8 @@ Running debby with any other arguments will run it as a dolt command.` // Exit return default: + // Reset choice + choice = 0 // Print menu fmt.Println("1. Read table names") fmt.Println("2. Run query") @@ -98,7 +98,6 @@ Running debby with any other arguments will run it as a dolt command.` // Read user input fmt.Scanln(&choice) - fmt.Println("Invalid choice") } // Reset all variables except choice |