333ff22e9a
Embrace the future and use Go 1.6's vendor support via Godep. Go 1.5 users should `export GO15VENDOREXPERIMENT=1`
19 lines
297 B
Go
19 lines
297 B
Go
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))
|
|
}
|