Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
ca436f4b
Commit
ca436f4b
authored
Aug 04, 2017
by
Péter Szilágyi
Committed by
GitHub
Aug 04, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14897 from karalabe/cardinal-sin
cmd/puppeth: remove wrapping loop in single reads
parents
350bb6d9
455fcc83
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
18 deletions
+14
-18
wizard.go
cmd/puppeth/wizard.go
+14
-18
No files found.
cmd/puppeth/wizard.go
View file @
ca436f4b
...
...
@@ -106,7 +106,6 @@ func (w *wizard) readString() string {
// readDefaultString reads a single line from stdin, trimming if from spaces. If
// an empty line is entered, the default value is returned.
func
(
w
*
wizard
)
readDefaultString
(
def
string
)
string
{
for
{
fmt
.
Printf
(
"> "
)
text
,
err
:=
w
.
in
.
ReadString
(
'\n'
)
if
err
!=
nil
{
...
...
@@ -116,7 +115,6 @@ func (w *wizard) readDefaultString(def string) string {
return
text
}
return
def
}
}
// readInt reads a single line from stdin, trimming if from spaces, enforcing it
...
...
@@ -207,7 +205,6 @@ func (w *wizard) readDefaultFloat(def float64) float64 {
// readPassword reads a single line from stdin, trimming it from the trailing new
// line and returns it. The input will not be echoed.
func
(
w
*
wizard
)
readPassword
()
string
{
for
{
fmt
.
Printf
(
"> "
)
text
,
err
:=
terminal
.
ReadPassword
(
int
(
syscall
.
Stdin
))
if
err
!=
nil
{
...
...
@@ -215,7 +212,6 @@ func (w *wizard) readPassword() string {
}
fmt
.
Println
()
return
string
(
text
)
}
}
// readAddress reads a single line from stdin, trimming if from spaces and converts
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment