Skip to content

Commit

Permalink
chore: make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Feb 26, 2024
1 parent 7563573 commit 5aca1f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/gocq/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {

Check warning on line 464 in cmd/gocq/main.go

View workflow job for this annotation

GitHub Actions / lint

unused-parameter: parameter 'e' seems to be unused, consider removing or renaming it as _ (revive)
if !base.UseSSOAddress {
log.Infof("收到服务器地址更新通知, 根据配置文件已忽略.")
return false
Expand Down
2 changes: 1 addition & 1 deletion server/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
}
Expand Down

0 comments on commit 5aca1f4

Please sign in to comment.