add readline.Password()

This commit is contained in:
chzyer 2016-04-01 17:54:50 +08:00
parent a5bc4d464a
commit d85c8b4802
1 changed files with 5 additions and 0 deletions

5
std.go
View File

@ -53,6 +53,11 @@ func AddHistory(content string) error {
return ins.SaveHistory(content) return ins.SaveHistory(content)
} }
func Password(prompt string) ([]byte, error) {
ins := getInstance()
return ins.ReadPassword(prompt)
}
// readline with global configs // readline with global configs
func Line(prompt string) (string, error) { func Line(prompt string) (string, error) {
ins := getInstance() ins := getInstance()