fix(lint): 修复 lua 测试中 unused-parameter 错误
将未使用的函数参数 L 改为 _ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
bb77fa6a98
commit
f84e2c0e9b
@ -45,7 +45,7 @@ func TestTimerManagerCancel(t *testing.T) {
|
||||
|
||||
manager := engine.TimerManager()
|
||||
|
||||
callback := engine.L.NewFunction(func(L *glua.LState) int {
|
||||
callback := engine.L.NewFunction(func(_ *glua.LState) int {
|
||||
return 0
|
||||
})
|
||||
|
||||
@ -72,7 +72,7 @@ func TestTimerManagerWaitAll(t *testing.T) {
|
||||
|
||||
// 创建多个定时器
|
||||
for range 3 {
|
||||
callback := engine.L.NewFunction(func(L *glua.LState) int {
|
||||
callback := engine.L.NewFunction(func(_ *glua.LState) int {
|
||||
return 0
|
||||
})
|
||||
manager.At(50*time.Millisecond, callback, nil)
|
||||
@ -128,7 +128,7 @@ func TestTimerRunningCount(t *testing.T) {
|
||||
assert.Equal(t, int32(0), manager.ActiveCount())
|
||||
|
||||
// 创建定时器
|
||||
callback := engine.L.NewFunction(func(L *glua.LState) int {
|
||||
callback := engine.L.NewFunction(func(_ *glua.LState) int {
|
||||
return 0
|
||||
})
|
||||
|
||||
|
||||
@ -631,7 +631,7 @@ func TestFilterPhaseWithBodyError(t *testing.T) {
|
||||
drw.EnableFilterPhase()
|
||||
|
||||
// 设置会返回错误的 body filter
|
||||
drw.GetInterceptor().SetBodyFilter(func(body []byte) ([]byte, error) {
|
||||
drw.GetInterceptor().SetBodyFilter(func(_ []byte) ([]byte, error) {
|
||||
return nil, fmt.Errorf("body filter error")
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user