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
af28d128
Commit
af28d128
authored
May 31, 2018
by
kiel barry
Committed by
Felix Lange
May 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: squash golint warnings (#16836)
parent
0ad32d3b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
bridge.go
console/bridge.go
+2
-2
console.go
console/console.go
+2
-0
No files found.
console/bridge.go
View file @
af28d128
...
@@ -271,7 +271,7 @@ func (b *bridge) SleepBlocks(call otto.FunctionCall) (response otto.Value) {
...
@@ -271,7 +271,7 @@ func (b *bridge) SleepBlocks(call otto.FunctionCall) (response otto.Value) {
}
}
type
jsonrpcCall
struct
{
type
jsonrpcCall
struct
{
I
d
int64
I
D
int64
Method
string
Method
string
Params
[]
interface
{}
Params
[]
interface
{}
}
}
...
@@ -304,7 +304,7 @@ func (b *bridge) Send(call otto.FunctionCall) (response otto.Value) {
...
@@ -304,7 +304,7 @@ func (b *bridge) Send(call otto.FunctionCall) (response otto.Value) {
resps
,
_
:=
call
.
Otto
.
Object
(
"new Array()"
)
resps
,
_
:=
call
.
Otto
.
Object
(
"new Array()"
)
for
_
,
req
:=
range
reqs
{
for
_
,
req
:=
range
reqs
{
resp
,
_
:=
call
.
Otto
.
Object
(
`({"jsonrpc":"2.0"})`
)
resp
,
_
:=
call
.
Otto
.
Object
(
`({"jsonrpc":"2.0"})`
)
resp
.
Set
(
"id"
,
req
.
I
d
)
resp
.
Set
(
"id"
,
req
.
I
D
)
var
result
json
.
RawMessage
var
result
json
.
RawMessage
err
=
b
.
client
.
Call
(
&
result
,
req
.
Method
,
req
.
Params
...
)
err
=
b
.
client
.
Call
(
&
result
,
req
.
Method
,
req
.
Params
...
)
switch
err
:=
err
.
(
type
)
{
switch
err
:=
err
.
(
type
)
{
...
...
console/console.go
View file @
af28d128
...
@@ -73,6 +73,8 @@ type Console struct {
...
@@ -73,6 +73,8 @@ type Console struct {
printer
io
.
Writer
// Output writer to serialize any display strings to
printer
io
.
Writer
// Output writer to serialize any display strings to
}
}
// New initializes a JavaScript interpreted runtime environment and sets defaults
// with the config struct.
func
New
(
config
Config
)
(
*
Console
,
error
)
{
func
New
(
config
Config
)
(
*
Console
,
error
)
{
// Handle unset config values gracefully
// Handle unset config values gracefully
if
config
.
Prompter
==
nil
{
if
config
.
Prompter
==
nil
{
...
...
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