mirror of
https://github.com/minio/minio.git
synced 2024-12-27 15:45:55 -05:00
33 lines
406 B
Markdown
33 lines
406 B
Markdown
|
|
||
|
# go-prompt
|
||
|
|
||
|
Terminal prompts for Go.
|
||
|
|
||
|
View the [docs](http://godoc.org/pkg/github.com/segmentio/go-prompt).
|
||
|
|
||
|
## Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import "github.com/segmentio/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])
|
||
|
}
|
||
|
```
|
||
|
|
||
|
## License
|
||
|
|
||
|
MIT
|