From d85c8b4802f350f987ed1389f90bee7e6f61586f Mon Sep 17 00:00:00 2001 From: chzyer <0@0xdf.com> Date: Fri, 1 Apr 2016 17:54:50 +0800 Subject: [PATCH] add readline.Password() --- std.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/std.go b/std.go index 5fe2c29..eb72882 100644 --- a/std.go +++ b/std.go @@ -53,6 +53,11 @@ func AddHistory(content string) error { return ins.SaveHistory(content) } +func Password(prompt string) ([]byte, error) { + ins := getInstance() + return ins.ReadPassword(prompt) +} + // readline with global configs func Line(prompt string) (string, error) { ins := getInstance()