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
87f294aa
Unverified
Commit
87f294aa
authored
Aug 20, 2018
by
Péter Szilágyi
Committed by
GitHub
Aug 20, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #17437 from hackmod/console-typo
console: fixed comment typo
parents
68f0a414
0fd02fe9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
console.go
console/console.go
+1
-1
console_test.go
console/console_test.go
+4
-4
prompter.go
console/prompter.go
+1
-1
No files found.
console/console.go
View file @
87f294aa
...
...
@@ -314,7 +314,7 @@ func (c *Console) Interactive() {
input
=
""
// Current user input
scheduler
=
make
(
chan
string
)
// Channel to send the next prompt on and receive the input
)
// Start a goroutine to listen for promt requests and send back inputs
// Start a goroutine to listen for prom
p
t requests and send back inputs
go
func
()
{
for
{
// Read the next user input
...
...
console/console_test.go
View file @
87f294aa
...
...
@@ -201,7 +201,7 @@ func TestInteractive(t *testing.T) {
go
tester
.
console
.
Interactive
()
// Wait for a promt and send a statement back
// Wait for a prom
p
t and send a statement back
select
{
case
<-
tester
.
input
.
scheduler
:
case
<-
time
.
After
(
time
.
Second
)
:
...
...
@@ -212,7 +212,7 @@ func TestInteractive(t *testing.T) {
case
<-
time
.
After
(
time
.
Second
)
:
t
.
Fatalf
(
"input feedback timeout"
)
}
// Wait for the second promt and ensure first statement was evaluated
// Wait for the second prom
p
t and ensure first statement was evaluated
select
{
case
<-
tester
.
input
.
scheduler
:
case
<-
time
.
After
(
time
.
Second
)
:
...
...
@@ -249,7 +249,7 @@ func TestExecute(t *testing.T) {
}
// Tests that the JavaScript objects returned by statement executions are properly
// pretty printed instead of just displaing "[object]".
// pretty printed instead of just displa
y
ing "[object]".
func
TestPrettyPrint
(
t
*
testing
.
T
)
{
tester
:=
newTester
(
t
,
nil
)
defer
tester
.
Close
(
t
)
...
...
@@ -300,7 +300,7 @@ func TestIndenting(t *testing.T) {
}{
{
`var a = 1;`
,
0
},
{
`"some string"`
,
0
},
{
`"some string with (parentesis`
,
0
},
{
`"some string with (parent
h
esis`
,
0
},
{
`"some string with newline
("`
,
0
},
{
`function v(a,b) {}`
,
0
},
...
...
console/prompter.go
View file @
87f294aa
...
...
@@ -27,7 +27,7 @@ import (
// Only this reader may be used for input because it keeps an internal buffer.
var
Stdin
=
newTerminalPrompter
()
// UserPrompter defines the methods needed by the console to promt the user for
// UserPrompter defines the methods needed by the console to prom
p
t the user for
// various types of inputs.
type
UserPrompter
interface
{
// PromptInput displays the given prompt to the user and requests some textual
...
...
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