Skip to content

Commit 9c70bf6

Browse files
committed
fix: resolve linting issues - import order and errcheck
1 parent 765dbd2 commit 9c70bf6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

internal/collectors/ghcr_collector_integration_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import (
77
"testing"
88
"time"
99

10+
"github.com/prometheus/client_golang/prometheus"
11+
"github.com/prometheus/client_golang/prometheus/testutil"
12+
1013
"ghcr-exporter/internal/config"
1114
"ghcr-exporter/internal/metrics"
12-
1315
promexporter_config "github.com/d0ugal/promexporter/config"
1416
promexporter_metrics "github.com/d0ugal/promexporter/metrics"
15-
"github.com/prometheus/client_golang/prometheus"
16-
"github.com/prometheus/client_golang/prometheus/testutil"
1717
)
1818

1919
// TestGHCRCollectorIntegration tests the full collection flow to catch label mapping issues
@@ -24,7 +24,7 @@ func TestGHCRCollectorIntegration(t *testing.T) {
2424
case "/v2/d0ugal/filesystem-exporter/tags/list":
2525
w.Header().Set("Content-Type", "application/json")
2626
w.WriteHeader(http.StatusOK)
27-
w.Write([]byte(`{
27+
_, _ = w.Write([]byte(`{
2828
"name": "d0ugal/filesystem-exporter",
2929
"tags": [
3030
"v1.22.4",
@@ -35,7 +35,7 @@ func TestGHCRCollectorIntegration(t *testing.T) {
3535
case "/v2/d0ugal/filesystem-exporter/manifests/latest":
3636
w.Header().Set("Content-Type", "application/vnd.docker.distribution.manifest.v2+json")
3737
w.WriteHeader(http.StatusOK)
38-
w.Write([]byte(`{
38+
_, _ = w.Write([]byte(`{
3939
"schemaVersion": 2,
4040
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
4141
"config": {
@@ -48,7 +48,7 @@ func TestGHCRCollectorIntegration(t *testing.T) {
4848
case "/v2/d0ugal/filesystem-exporter/manifests/sha256:abc123":
4949
w.Header().Set("Content-Type", "application/vnd.docker.container.image.v1+json")
5050
w.WriteHeader(http.StatusOK)
51-
w.Write([]byte(`{
51+
_, _ = w.Write([]byte(`{
5252
"created": "2025-10-27T20:00:00Z",
5353
"config": {
5454
"Labels": {

0 commit comments

Comments
 (0)