mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-21 23:22:34 +01:00
fix: check all Close() return values for errcheck lint
Add explicit error discards (_ =) for Close() calls on network connections, SQL rows, and file handles across 28 files. Also add .golangci.yml with standard linter defaults to match CI configuration.
This commit is contained in:
@@ -556,7 +556,7 @@ func GetGuildInfoByID(s *Session, guildID uint32) (*Guild, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer rows.Close()
|
||||
defer func() { _ = rows.Close() }()
|
||||
|
||||
hasRow := rows.Next()
|
||||
|
||||
@@ -591,7 +591,7 @@ func GetGuildInfoByCharacterId(s *Session, charID uint32) (*Guild, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer rows.Close()
|
||||
defer func() { _ = rows.Close() }()
|
||||
|
||||
hasRow := rows.Next()
|
||||
|
||||
@@ -1884,7 +1884,7 @@ func handleMsgMhfGuildHuntdata(s *Session, p mhfpacket.MHFPacket) {
|
||||
continue
|
||||
}
|
||||
if count == 255 {
|
||||
rows.Close()
|
||||
_ = rows.Close()
|
||||
break
|
||||
}
|
||||
count++
|
||||
|
||||
Reference in New Issue
Block a user