Go terminal prompts.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
History.md Release v1.2.0 Dec 10, 2014
Readme.md
prompt.go

Readme.md

go-prompt

Terminal prompts for Go.

View the docs.

Example

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