TheMathemagicians/sevenkeys/cli/mainui.go

30 lines
437 B
Go
Raw Normal View History

2024-06-10 15:34:16 +00:00
package cli
import (
2024-06-11 09:43:30 +00:00
"database/sql"
2024-06-10 15:34:16 +00:00
"fmt"
"sevenkeys/logic"
)
2024-06-11 09:43:30 +00:00
func MainCliLoop(db *sql.DB, searchOptions logic.SearchOptions) {
2024-06-10 15:34:16 +00:00
var command string
for {
command = GetStringResponse("SEVENKEYS $")
switch command {
case "quit":
return
case "splash":
ShowSplashScreen()
break
case "stash":
2024-06-11 09:43:30 +00:00
StashCliLoop(db, searchOptions)
2024-06-10 15:34:16 +00:00
break
default:
fmt.Println("Unrecognized command:", command)
break
}
}
}