aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/puppeth/wizard_network.go
diff options
context:
space:
mode:
authorEgon Elbre <egonelbre@gmail.com>2017-08-07 19:34:21 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-08-07 19:34:21 +0800
commit85454e7678f8f295ae72b8579aa443f9e45344cb (patch)
tree264f1ed9c86a0c6abec55eb3dd59603b53c82d0a /cmd/puppeth/wizard_network.go
parent8c2cf3c66cf1d678b8b22e2c6245976058bfb525 (diff)
downloadgo-tangerine-85454e7678f8f295ae72b8579aa443f9e45344cb.tar
go-tangerine-85454e7678f8f295ae72b8579aa443f9e45344cb.tar.gz
go-tangerine-85454e7678f8f295ae72b8579aa443f9e45344cb.tar.bz2
go-tangerine-85454e7678f8f295ae72b8579aa443f9e45344cb.tar.lz
go-tangerine-85454e7678f8f295ae72b8579aa443f9e45344cb.tar.xz
go-tangerine-85454e7678f8f295ae72b8579aa443f9e45344cb.tar.zst
go-tangerine-85454e7678f8f295ae72b8579aa443f9e45344cb.zip
cmd: fix megacheck warnings (#14912)
* cmd: fix megacheck warnings * cmd: revert time.Until changes, keep readFloat
Diffstat (limited to 'cmd/puppeth/wizard_network.go')
-rw-r--r--cmd/puppeth/wizard_network.go26
1 files changed, 12 insertions, 14 deletions
diff --git a/cmd/puppeth/wizard_network.go b/cmd/puppeth/wizard_network.go
index 0455e1ef3..ff2ff74f5 100644
--- a/cmd/puppeth/wizard_network.go
+++ b/cmd/puppeth/wizard_network.go
@@ -71,22 +71,20 @@ func (w *wizard) makeServer() string {
fmt.Println()
fmt.Println("Please enter remote server's address:")
- for {
- // Read and fial the server to ensure docker is present
- input := w.readString()
-
- client, err := dial(input, nil)
- if err != nil {
- log.Error("Server not ready for puppeth", "err", err)
- return ""
- }
- // All checks passed, start tracking the server
- w.servers[input] = client
- w.conf.Servers[input] = client.pubkey
- w.conf.flush()
+ // Read and fial the server to ensure docker is present
+ input := w.readString()
- return input
+ client, err := dial(input, nil)
+ if err != nil {
+ log.Error("Server not ready for puppeth", "err", err)
+ return ""
}
+ // All checks passed, start tracking the server
+ w.servers[input] = client
+ w.conf.Servers[input] = client.pubkey
+ w.conf.flush()
+
+ return input
}
// selectServer lists the user all the currnetly known servers to choose from,