cmd/puppeth: use geth's prompt to read input (#23718)

* cmd/puppeth: use geth's prompt to read input

* remove wizard.in

* cmd/puppeth: fix compilation errors

* reset prompt (don't exit) on receiving ctrl-c

* make promptInput spin until the user enters a value or interrupts (ctrl-d)

* make promptInput use parameter

Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
jwasinger
2021-10-18 20:59:01 +02:00
committed by GitHub
parent c36f8fefc3
commit 60d3cc8b77
2 changed files with 33 additions and 90 deletions

View File

@ -17,7 +17,6 @@
package main
import (
"bufio"
"encoding/json"
"fmt"
"io/ioutil"
@ -38,7 +37,6 @@ func makeWizard(network string) *wizard {
},
servers: make(map[string]*sshClient),
services: make(map[string][]string),
in: bufio.NewReader(os.Stdin),
}
}