Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

segmentio/go-prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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