TheMathemagicians/sevenkeys/cli/mainui.go

29 lines
368 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"
)
2024-06-11 09:57:02 +00:00
func MainCliLoop(db *sql.DB) {
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:57:02 +00:00
StashCliLoop(db)
2024-06-10 15:34:16 +00:00
break
default:
fmt.Println("Unrecognized command:", command)
break
}
}
}