console: squash golint warnings (#16836)

This commit is contained in:
Daniel Liu 2025-01-14 10:56:07 +08:00
parent 930ec9ba86
commit 67fe815714
2 changed files with 4 additions and 2 deletions

View file

@ -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...)

View file

@ -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 {