29 lines
368 B
Go
29 lines
368 B
Go
package cli
|
|
|
|
import (
|
|
"database/sql"
|
|
"fmt"
|
|
)
|
|
|
|
func MainCliLoop(db *sql.DB) {
|
|
var command string
|
|
|
|
for {
|
|
command = GetStringResponse("SEVENKEYS $")
|
|
|
|
switch command {
|
|
case "quit":
|
|
return
|
|
case "splash":
|
|
ShowSplashScreen()
|
|
break
|
|
case "stash":
|
|
StashCliLoop(db)
|
|
break
|
|
default:
|
|
fmt.Println("Unrecognized command:", command)
|
|
break
|
|
}
|
|
}
|
|
}
|