Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 591 Bytes

Readme.md

File metadata and controls

44 lines (34 loc) · 591 Bytes

forked from segmentio/go-prompt

go-prompt

Terminal prompts for Go.

View the docs.

How to use:

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])
}

Functions:

  • String
  • StringRequired
  • StringDefault
  • Stringln
  • Integer
  • IntegerRequired
  • Confirm
  • Choose
  • ChooseInterface
  • Password
  • PasswordMasked