fix(ci): 修复最后一批CI错误
- 修复 ops_repo_trends.go 中剩余3处 Rows.Close 未检查错误 - 修复 ops_settings.go, ops_settings_models.go, ops_trends.go 的格式化问题
This commit is contained in:
@@ -265,7 +265,7 @@ LIMIT $4`
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer rows.Close()
|
defer func() { _ = rows.Close() }()
|
||||||
|
|
||||||
items := make([]*service.OpsThroughputGroupBreakdownItem, 0, limit)
|
items := make([]*service.OpsThroughputGroupBreakdownItem, 0, limit)
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
@@ -431,7 +431,7 @@ ORDER BY 1 ASC`
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer rows.Close()
|
defer func() { _ = rows.Close() }()
|
||||||
|
|
||||||
points := make([]*service.OpsErrorTrendPoint, 0, 256)
|
points := make([]*service.OpsErrorTrendPoint, 0, 256)
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
@@ -542,7 +542,7 @@ LIMIT 20`
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer rows.Close()
|
defer func() { _ = rows.Close() }()
|
||||||
|
|
||||||
items := make([]*service.OpsErrorDistributionItem, 0, 16)
|
items := make([]*service.OpsErrorDistributionItem, 0, 16)
|
||||||
var total int64
|
var total int64
|
||||||
|
|||||||
@@ -463,4 +463,3 @@ func (s *OpsService) UpdateOpsAdvancedSettings(ctx context.Context, cfg *OpsAdva
|
|||||||
_ = json.Unmarshal(raw, updated)
|
_ = json.Unmarshal(raw, updated)
|
||||||
return updated, nil
|
return updated, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,4 +85,3 @@ type OpsDataRetentionSettings struct {
|
|||||||
type OpsAggregationSettings struct {
|
type OpsAggregationSettings struct {
|
||||||
AggregationEnabled bool `json:"aggregation_enabled"`
|
AggregationEnabled bool `json:"aggregation_enabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,4 +24,3 @@ func (s *OpsService) GetThroughputTrend(ctx context.Context, filter *OpsDashboar
|
|||||||
}
|
}
|
||||||
return s.opsRepo.GetThroughputTrend(ctx, filter, bucketSeconds)
|
return s.opsRepo.GetThroughputTrend(ctx, filter, bucketSeconds)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user