mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 07:37:20 +00:00
console/prompt: use PromptInput in PromptConfirm method (#33445)
This commit is contained in:
parent
4531bfebec
commit
b9702ed27b
1 changed files with 1 additions and 1 deletions
|
|
@ -142,7 +142,7 @@ func (p *terminalPrompter) PromptPassword(prompt string) (passwd string, err err
|
|||
// PromptConfirm displays the given prompt to the user and requests a boolean
|
||||
// choice to be made, returning that choice.
|
||||
func (p *terminalPrompter) PromptConfirm(prompt string) (bool, error) {
|
||||
input, err := p.Prompt(prompt + " [y/n] ")
|
||||
input, err := p.PromptInput(prompt + " [y/n] ")
|
||||
if len(input) > 0 && strings.EqualFold(input[:1], "y") {
|
||||
return true, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue