forked from segmentio/go-prompt
Terminal prompts for Go.
View the docs.
package main
import "github.com/riteshpradhan/go-prompt"
var langs = []string{
"c",
"c++",
"lua",
"go",
"js",
"ruby",
"python",
}
func main() {
i := prompt.Choose("What's your favorite language?", langs)
println("picked: " + langs[i])
}
- String
- StringRequired
- StringDefault
- Stringln
- Integer
- IntegerRequired
- Confirm
- Choose
- ChooseInterface
- Password
- PasswordMasked