Skip to content

Commit 6d632a5

Browse files
committed
linter fixes
1 parent 8e10d2c commit 6d632a5

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

pkg/metrics/generate_integration_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ func Test_Generate(t *testing.T) {
7979
}
8080

8181
generatedData := map[string]string{
82-
"metrics.yaml": header + "---\n" + string(output[1]),
83-
"rbac.yaml": "---\n" + string(output[2]),
82+
"metrics.yaml": header + "---\n" + output[1],
83+
"rbac.yaml": "---\n" + output[2],
8484
}
8585

8686
t.Log("Comparing output to testdata to check for regressions")

pkg/metrics/markers/labelfrompath_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ func Test_labelFromPathMarker_ApplyToResource(t *testing.T) {
126126
if !reflect.DeepEqual(tt.resource, tt.wantResource) {
127127
t.Errorf("labelFromPathMarker.ApplyToResource() = %v, want %v", tt.resource, tt.wantResource)
128128
}
129-
130129
})
131130
}
132131
}

pkg/metrics/markers/metric_gauge.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (g gaugeMarker) ToGenerator(basePath ...string) (*config.Generator, error)
7777
if g.ValueFrom != nil {
7878
valueFrom, err = g.ValueFrom.Parse()
7979
if err != nil {
80-
return nil, fmt.Errorf("failed to parse ValueFrom: %v", err)
80+
return nil, fmt.Errorf("failed to parse ValueFrom: %w", err)
8181
}
8282
}
8383

pkg/metrics/markers/metric_stateset.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func (s stateSetMarker) ToGenerator(basePath ...string) (*config.Generator, erro
7474
if s.JSONPath != nil {
7575
valueFrom, err = s.JSONPath.Parse()
7676
if err != nil {
77-
return nil, fmt.Errorf("failed to parse JSONPath: %v", err)
77+
return nil, fmt.Errorf("failed to parse JSONPath: %w", err)
7878
}
7979
}
8080

0 commit comments

Comments
 (0)