good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
ca436f4b
Commit
ca436f4b
authored
Aug 4, 2017
by
Péter Szilágyi
Committed by
GitHub
Aug 4, 2017
Browse files
Options
Downloads
Plain Diff
Merge pull request #14897 from karalabe/cardinal-sin
cmd/puppeth: remove wrapping loop in single reads
parents
350bb6d9
455fcc83
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmd/puppeth/wizard.go
+14
-18
14 additions, 18 deletions
cmd/puppeth/wizard.go
with
14 additions
and
18 deletions
cmd/puppeth/wizard.go
+
14
−
18
View file @
ca436f4b
...
@@ -106,7 +106,6 @@ func (w *wizard) readString() string {
...
@@ -106,7 +106,6 @@ func (w *wizard) readString() string {
// readDefaultString reads a single line from stdin, trimming if from spaces. If
// readDefaultString reads a single line from stdin, trimming if from spaces. If
// an empty line is entered, the default value is returned.
// an empty line is entered, the default value is returned.
func
(
w
*
wizard
)
readDefaultString
(
def
string
)
string
{
func
(
w
*
wizard
)
readDefaultString
(
def
string
)
string
{
for
{
fmt
.
Printf
(
"> "
)
fmt
.
Printf
(
"> "
)
text
,
err
:=
w
.
in
.
ReadString
(
'\n'
)
text
,
err
:=
w
.
in
.
ReadString
(
'\n'
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -117,7 +116,6 @@ func (w *wizard) readDefaultString(def string) string {
...
@@ -117,7 +116,6 @@ func (w *wizard) readDefaultString(def string) string {
}
}
return
def
return
def
}
}
}
// readInt reads a single line from stdin, trimming if from spaces, enforcing it
// readInt reads a single line from stdin, trimming if from spaces, enforcing it
// to parse into an integer.
// to parse into an integer.
...
@@ -207,7 +205,6 @@ func (w *wizard) readDefaultFloat(def float64) float64 {
...
@@ -207,7 +205,6 @@ func (w *wizard) readDefaultFloat(def float64) float64 {
// readPassword reads a single line from stdin, trimming it from the trailing new
// readPassword reads a single line from stdin, trimming it from the trailing new
// line and returns it. The input will not be echoed.
// line and returns it. The input will not be echoed.
func
(
w
*
wizard
)
readPassword
()
string
{
func
(
w
*
wizard
)
readPassword
()
string
{
for
{
fmt
.
Printf
(
"> "
)
fmt
.
Printf
(
"> "
)
text
,
err
:=
terminal
.
ReadPassword
(
int
(
syscall
.
Stdin
))
text
,
err
:=
terminal
.
ReadPassword
(
int
(
syscall
.
Stdin
))
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -216,7 +213,6 @@ func (w *wizard) readPassword() string {
...
@@ -216,7 +213,6 @@ func (w *wizard) readPassword() string {
fmt
.
Println
()
fmt
.
Println
()
return
string
(
text
)
return
string
(
text
)
}
}
}
// readAddress reads a single line from stdin, trimming if from spaces and converts
// readAddress reads a single line from stdin, trimming if from spaces and converts
// it to an Ethereum address.
// it to an Ethereum address.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment