diff --git a/console/bridge.go b/console/bridge.go index 34f77dcbfbe48..3f7982b5f6981 100644 --- a/console/bridge.go +++ b/console/bridge.go @@ -314,7 +314,7 @@ func (b *bridge) SleepBlocks(call jsre.Call) (goja.Value, error) { } type jsonrpcCall struct { - Id int64 + ID int64 Method string Params []interface{} } @@ -348,7 +348,7 @@ func (b *bridge) Send(call jsre.Call) (goja.Value, error) { for _, req := range reqs { resp := call.VM.NewObject() resp.Set("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...) diff --git a/console/console.go b/console/console.go index 880db0f017493..517da6bc70fc3 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 {