mirror of
https://github.com/manifoldco/promptui.git
synced 2026-03-15 14:55:52 +01:00
24 lines
381 B
Go
24 lines
381 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/manifoldco/promptui"
|
|
)
|
|
|
|
func main() {
|
|
prompt := promptui.Select{
|
|
Label: "Select Day",
|
|
Items: []string{"Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
|
|
"Saturday", "Sunday"},
|
|
}
|
|
|
|
_, result, err := prompt.Run()
|
|
|
|
if err != nil {
|
|
fmt.Printf("Prompt failed %v\n", err)
|
|
return
|
|
}
|
|
|
|
fmt.Printf("You choose %q\n", result)
|
|
}
|