Skip to content

Commit 426bd11

Browse files
committed
Fix lint errors
gofumpt and revive
1 parent 3d15eee commit 426bd11

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/clients/cloudwatch/v1/client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ func toMetricDataResult(resp cloudwatch.GetMetricDataOutput, exportAllDataPoints
147147
for _, metricDataResult := range resp.MetricDataResults {
148148
mappedResult := cloudwatch_client.MetricDataResult{
149149
ID: *metricDataResult.Id,
150-
DataPoints: make([]cloudwatch_client.DataPoint, 0, len(metricDataResult.Timestamps))}
150+
DataPoints: make([]cloudwatch_client.DataPoint, 0, len(metricDataResult.Timestamps)),
151+
}
151152
for i := 0; i < len(metricDataResult.Timestamps); i++ {
152153
mappedResult.DataPoints = append(mappedResult.DataPoints, cloudwatch_client.DataPoint{
153154
Value: metricDataResult.Values[i],

pkg/promutil/migrate.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,9 @@ func BuildMetrics(results []model.CloudwatchMetricResult, labelsSnakeCase bool,
127127
if metric.MetricMigrationParams.ExportAllDataPoints {
128128
// If we're exporting all data points, we can skip this one and check for a historical datapoint
129129
continue
130-
} else {
131-
// If we are not exporting all data points, we better have nothing exported
132-
break
133130
}
131+
// If we are not exporting all data points, we better have nothing exported
132+
break
134133
}
135134
if dataPoint == nil {
136135
exportedDatapoint = math.NaN()
@@ -148,7 +147,7 @@ func BuildMetrics(results []model.CloudwatchMetricResult, labelsSnakeCase bool,
148147
observedMetricLabels = recordLabelsForMetric(name, promLabels, observedMetricLabels)
149148

150149
if !metric.MetricMigrationParams.AddCloudwatchTimestamp {
151-
//if we're not adding the original timestamp, we have to zero it so we can validate the data in the exporter via EnsureLabelConsistencyAndRemoveDuplicates
150+
// if we're not adding the original timestamp, we have to zero it so we can validate the data in the exporter via EnsureLabelConsistencyAndRemoveDuplicates
152151
ts = time.Time{}
153152
}
154153

0 commit comments

Comments
 (0)