It is a package that requires a simple selection.
Key | Description |
---|---|
Enter | Decision |
Esc | Exit |
Key Arrow Down | Move to choices below |
Key Arrow Up | Move to choices above |
Key Arrow Right | Page Next |
Key Arrow Left | Page Prev |
To install, use go get
:
$ go get github.com/geeks-dev/go-choices
gamemode := []string{
"HUMAN",
"DEVIL HUNTER",
"SON OF SPARDA",
"HEAVEN OR HELL",
"LEGENDARY DARK KNIGHT",
"DANTE MUST DIE",
"HELL AND HELL",
"BLOODY PALACE",
}
mode, answered := choices.Ask(
gamemode,
"Devil May Cry",
)
if answered {
fmt.Println(gamemode[mode])
}