aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/admin.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-05-19 01:24:30 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-05-19 01:24:30 +0800
commitf14feea43683fee58e26a48a51145e72d3ae7ad8 (patch)
tree6f02793925e5917780a63024490dbc6f5a641f72 /cmd/geth/admin.go
parent36a4ba32485fb6605ea23f03896ae8d7c4cc44ae (diff)
downloadgo-tangerine-f14feea43683fee58e26a48a51145e72d3ae7ad8.tar
go-tangerine-f14feea43683fee58e26a48a51145e72d3ae7ad8.tar.gz
go-tangerine-f14feea43683fee58e26a48a51145e72d3ae7ad8.tar.bz2
go-tangerine-f14feea43683fee58e26a48a51145e72d3ae7ad8.tar.lz
go-tangerine-f14feea43683fee58e26a48a51145e72d3ae7ad8.tar.xz
go-tangerine-f14feea43683fee58e26a48a51145e72d3ae7ad8.tar.zst
go-tangerine-f14feea43683fee58e26a48a51145e72d3ae7ad8.zip
Refactor user prompts into utils
Diffstat (limited to 'cmd/geth/admin.go')
-rw-r--r--cmd/geth/admin.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go
index ebdf3512a..53dd0e6ad 100644
--- a/cmd/geth/admin.go
+++ b/cmd/geth/admin.go
@@ -383,7 +383,7 @@ func (js *jsre) unlock(call otto.FunctionCall) otto.Value {
var passphrase string
if arg.IsUndefined() {
fmt.Println("Please enter a passphrase now.")
- passphrase, err = readPassword("Passphrase: ", true)
+ passphrase, err = utils.PromptPassword("Passphrase: ", true)
if err != nil {
fmt.Println(err)
return otto.FalseValue()
@@ -410,12 +410,12 @@ func (js *jsre) newAccount(call otto.FunctionCall) otto.Value {
if arg.IsUndefined() {
fmt.Println("The new account will be encrypted with a passphrase.")
fmt.Println("Please enter a passphrase now.")
- auth, err := readPassword("Passphrase: ", true)
+ auth, err := utils.PromptPassword("Passphrase: ", true)
if err != nil {
fmt.Println(err)
return otto.FalseValue()
}
- confirm, err := readPassword("Repeat Passphrase: ", false)
+ confirm, err := utils.PromptPassword("Repeat Passphrase: ", false)
if err != nil {
fmt.Println(err)
return otto.FalseValue()