Skip to content

Commit 9dabd45

Browse files
committed
Linter fixes
1 parent f333004 commit 9dabd45

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

server/runtime_javascript_init.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ func (im *RuntimeJavascriptInitModule) mappings(r *goja.Runtime) map[string]func
269269
func (im *RuntimeJavascriptInitModule) Constructor(r *goja.Runtime) (*goja.Object, error) {
270270
constructor := func(call goja.ConstructorCall) *goja.Object {
271271
for key, fn := range im.mappings(r) {
272-
call.This.Set(key, fn)
272+
_ = call.This.Set(key, fn)
273273
}
274274

275275
return nil
@@ -1614,7 +1614,7 @@ func (im *RuntimeJavascriptInitModule) getMatchHookFnIdentifier(r *goja.Runtime,
16141614
}
16151615
}
16161616
} else {
1617-
obj, ok = callExp.ArgumentList[1].(*ast.ObjectLiteral)
1617+
obj, _ = callExp.ArgumentList[1].(*ast.ObjectLiteral)
16181618
}
16191619

16201620
for _, prop := range obj.Value {

server/runtime_javascript_match_core.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ func (rm *RuntimeJavaScriptMatchCore) MatchJoinAttempt(tick int64, state interfa
279279
pointerizeSlices(state)
280280
stateObject := rm.vm.NewObject()
281281
for k, v := range state.(map[string]any) {
282-
stateObject.Set(k, v)
282+
_ = stateObject.Set(k, v)
283283
}
284284
args := []goja.Value{ctxObj, rm.loggerModule, rm.nakamaModule, rm.dispatcher, rm.vm.ToValue(tick), rm.vm.ToValue(stateObject), presenceObj, rm.vm.ToValue(metadata)}
285285
retVal, err := rm.joinAttemptFn(goja.Null(), args...)
@@ -343,7 +343,7 @@ func (rm *RuntimeJavaScriptMatchCore) MatchJoin(tick int64, state interface{}, j
343343
pointerizeSlices(state)
344344
stateObject := rm.vm.NewObject()
345345
for k, v := range state.(map[string]any) {
346-
stateObject.Set(k, v)
346+
_ = stateObject.Set(k, v)
347347
}
348348
args := []goja.Value{rm.ctx, rm.loggerModule, rm.nakamaModule, rm.dispatcher, rm.vm.ToValue(tick), rm.vm.ToValue(stateObject), rm.vm.ToValue(presences)}
349349
retVal, err := rm.joinFn(goja.Null(), args...)
@@ -388,7 +388,7 @@ func (rm *RuntimeJavaScriptMatchCore) MatchLeave(tick int64, state interface{},
388388
s := state.(map[string]any)
389389
o := rm.vm.NewObject()
390390
for k, v := range s {
391-
o.Set(k, v)
391+
_ = o.Set(k, v)
392392
}
393393
args := []goja.Value{rm.ctx, rm.loggerModule, rm.nakamaModule, rm.dispatcher, rm.vm.ToValue(tick), rm.vm.ToValue(o), rm.vm.ToValue(presences)}
394394
retVal, err := rm.leaveFn(goja.Null(), args...)
@@ -445,7 +445,7 @@ func (rm *RuntimeJavaScriptMatchCore) MatchLoop(tick int64, state interface{}, i
445445
pointerizeSlices(state)
446446
stateObject := rm.vm.NewObject()
447447
for k, v := range state.(map[string]any) {
448-
stateObject.Set(k, v)
448+
_ = stateObject.Set(k, v)
449449
}
450450
args := []goja.Value{rm.ctx, rm.loggerModule, rm.nakamaModule, rm.dispatcher, rm.vm.ToValue(tick), rm.vm.ToValue(stateObject), rm.vm.ToValue(inputs)}
451451
retVal, err := rm.loopFn(goja.Null(), args...)
@@ -477,7 +477,7 @@ func (rm *RuntimeJavaScriptMatchCore) MatchTerminate(tick int64, state interface
477477
pointerizeSlices(state)
478478
stateObject := rm.vm.NewObject()
479479
for k, v := range state.(map[string]any) {
480-
stateObject.Set(k, v)
480+
_ = stateObject.Set(k, v)
481481
}
482482
args := []goja.Value{rm.ctx, rm.loggerModule, rm.nakamaModule, rm.dispatcher, rm.vm.ToValue(tick), rm.vm.ToValue(stateObject), rm.vm.ToValue(graceSeconds)}
483483
retVal, err := rm.terminateFn(goja.Null(), args...)
@@ -509,7 +509,7 @@ func (rm *RuntimeJavaScriptMatchCore) MatchSignal(tick int64, state interface{},
509509
pointerizeSlices(state)
510510
stateObject := rm.vm.NewObject()
511511
for k, v := range state.(map[string]any) {
512-
stateObject.Set(k, v)
512+
_ = stateObject.Set(k, v)
513513
}
514514
args := []goja.Value{rm.ctx, rm.loggerModule, rm.nakamaModule, rm.dispatcher, rm.vm.ToValue(tick), rm.vm.ToValue(stateObject), rm.vm.ToValue(data)}
515515
retVal, err := rm.signalFn(goja.Null(), args...)

0 commit comments

Comments
 (0)