open-nomad/vendor/github.com/bgentry/speakeasy/example/main.go

19 lines
297 B
Go
Raw Normal View History

2016-02-12 18:02:16 +00:00
package main
import (
"fmt"
"os"
"github.com/bgentry/speakeasy"
)
func main() {
password, err := speakeasy.Ask("Please enter a password: ")
if err != nil {
fmt.Println(err)
os.Exit(1)
}
fmt.Printf("Password result: %q\n", password)
fmt.Printf("Password len: %d\n", len(password))
}