aboutsummaryrefslogtreecommitdiffstats
path: root/console
diff options
context:
space:
mode:
authorkiel barry <kiel.j.barry@gmail.com>2018-05-31 19:59:08 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-05-31 19:59:08 +0800
commitaf28d12847c4572c7c3d9f5775db9b18bcfc3889 (patch)
tree11b2d1e9d329afdef635f0c7bd34ccd1b4790532 /console
parent0ad32d3be70ca27044b56b5eee9c1b3bd38e2d69 (diff)
downloadgo-tangerine-af28d12847c4572c7c3d9f5775db9b18bcfc3889.tar
go-tangerine-af28d12847c4572c7c3d9f5775db9b18bcfc3889.tar.gz
go-tangerine-af28d12847c4572c7c3d9f5775db9b18bcfc3889.tar.bz2
go-tangerine-af28d12847c4572c7c3d9f5775db9b18bcfc3889.tar.lz
go-tangerine-af28d12847c4572c7c3d9f5775db9b18bcfc3889.tar.xz
go-tangerine-af28d12847c4572c7c3d9f5775db9b18bcfc3889.tar.zst
go-tangerine-af28d12847c4572c7c3d9f5775db9b18bcfc3889.zip
console: squash golint warnings (#16836)
Diffstat (limited to 'console')
-rw-r--r--console/bridge.go4
-rw-r--r--console/console.go2
2 files changed, 4 insertions, 2 deletions
diff --git a/console/bridge.go b/console/bridge.go
index f2120351c..b0b4d3798 100644
--- a/console/bridge.go
+++ b/console/bridge.go
@@ -271,7 +271,7 @@ func (b *bridge) SleepBlocks(call otto.FunctionCall) (response otto.Value) {
}
type jsonrpcCall struct {
- Id int64
+ ID int64
Method string
Params []interface{}
}
@@ -304,7 +304,7 @@ func (b *bridge) Send(call otto.FunctionCall) (response otto.Value) {
resps, _ := call.Otto.Object("new Array()")
for _, req := range reqs {
resp, _ := call.Otto.Object(`({"jsonrpc":"2.0"})`)
- resp.Set("id", req.Id)
+ resp.Set("id", req.ID)
var result json.RawMessage
err = b.client.Call(&result, req.Method, req.Params...)
switch err := err.(type) {
diff --git a/console/console.go b/console/console.go
index b280d4e65..1bceb7bc6 100644
--- a/console/console.go
+++ b/console/console.go
@@ -73,6 +73,8 @@ type Console struct {
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) {
// Handle unset config values gracefully
if config.Prompter == nil {