mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
Strip extraneous carriage return from end of entered password when not using liner
This commit is contained in:
parent
506c927791
commit
9fbf557d24
1 changed files with 1 additions and 0 deletions
|
|
@ -91,6 +91,7 @@ func PromptPassword(prompt string, warnTerm bool) (string, error) {
|
||||||
}
|
}
|
||||||
fmt.Print(prompt)
|
fmt.Print(prompt)
|
||||||
input, err := bufio.NewReader(os.Stdin).ReadString('\n')
|
input, err := bufio.NewReader(os.Stdin).ReadString('\n')
|
||||||
|
input = strings.TrimRight(input, "\n")
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
return input, err
|
return input, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue