From 5aca1f450050700378d9c10f97de1904b1320bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Mon, 26 Feb 2024 21:54:11 +0900 Subject: [PATCH] chore: make lint happy --- cmd/gocq/main.go | 4 ++-- server/websocket.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/gocq/main.go b/cmd/gocq/main.go index eab89f62b..3d670ce73 100644 --- a/cmd/gocq/main.go +++ b/cmd/gocq/main.go @@ -348,7 +348,7 @@ func LoginInteract() { } var times uint = 1 // 重试次数 var reLoginLock sync.Mutex - cli.DisconnectedEvent.Subscribe(func(q *client.QQClient, e *client.ClientDisconnectedEvent) { + cli.DisconnectedEvent.Subscribe(func(_ *client.QQClient, e *client.ClientDisconnectedEvent) { reLoginLock.Lock() defer reLoginLock.Unlock() times = 1 @@ -461,7 +461,7 @@ func PasswordHashDecrypt(encryptedPasswordHash string, key []byte) ([]byte, erro func newClient() *client.QQClient { c := client.NewClientEmpty() c.UseFragmentMessage = base.ForceFragmented - c.OnServerUpdated(func(bot *client.QQClient, e *client.ServerUpdatedEvent) bool { + c.OnServerUpdated(func(_ *client.QQClient, e *client.ServerUpdatedEvent) bool { if !base.UseSSOAddress { log.Infof("收到服务器地址更新通知, 根据配置文件已忽略.") return false diff --git a/server/websocket.go b/server/websocket.go index baaa471b1..b2b765c16 100644 --- a/server/websocket.go +++ b/server/websocket.go @@ -71,7 +71,7 @@ func (c *wsConn) Close() error { } var upgrader = websocket.Upgrader{ - CheckOrigin: func(r *http.Request) bool { + CheckOrigin: func(_ *http.Request) bool { return true }, }