fix(lint): 修复 golangci-lint 检查问题
- 格式化代码 (gofmt) - 修复 rows.Close() 返回值未检查 (errcheck) - 删除未使用的 usage_clamp.go 文件 (unused) - 删除临时测试目录
This commit is contained in:
@@ -975,7 +975,7 @@ func (r *accountRepository) loadTempUnschedStates(ctx context.Context, accountID
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
defer func() { _ = rows.Close() }()
|
||||
|
||||
for rows.Next() {
|
||||
var id int64
|
||||
|
||||
@@ -301,7 +301,7 @@ func (r *userRepository) filterUsersByAttributes(ctx context.Context, attrs map[
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
defer func() { _ = rows.Close() }()
|
||||
|
||||
result := make([]int64, 0)
|
||||
for rows.Next() {
|
||||
|
||||
Reference in New Issue
Block a user