From 45205373b7befe9cbba0878414eb6b928634c433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Bedi?= Date: Wed, 10 Sep 2025 15:00:05 +0200 Subject: [PATCH 1/2] Bump go to 1.25 --- .github/workflows/publish.yaml | 3 ++- .github/workflows/push.yaml | 3 ++- go.mod | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index b50b14f..7d2ae10 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -29,7 +29,8 @@ jobs: name: CD uses: grafana/plugin-ci-workflows/.github/workflows/cd.yml@main with: - golangci-lint-version: '1.64.6' + golangci-lint-version: '2.4.0' + go-version: '1.25' branch: ${{ github.event.inputs.branch }} environment: ${{ github.event.inputs.environment }} docs-only: ${{ fromJSON(github.event.inputs.docs-only) }} diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 78fc361..f5e2706 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -16,6 +16,7 @@ jobs: name: CI uses: grafana/plugin-ci-workflows/.github/workflows/ci.yml@main with: - golangci-lint-version: '1.64.6' + golangci-lint-version: '2.4.0' + go-version: '1.25' plugin-version-suffix: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || '' }} run-playwright: true diff --git a/go.mod b/go.mod index 6941032..febe84e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/grafana/mqtt-datasource -go 1.24.6 +go 1.25 require ( github.com/eclipse/paho.mqtt.golang v1.5.0 From dd04bc20af4418113c5a54d9d1aa607cc377115e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Bedi?= Date: Wed, 10 Sep 2025 19:31:06 +0200 Subject: [PATCH 2/2] Fix lint --- pkg/mqtt/client_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/mqtt/client_test.go b/pkg/mqtt/client_test.go index 1d448c3..3fa18d2 100644 --- a/pkg/mqtt/client_test.go +++ b/pkg/mqtt/client_test.go @@ -166,7 +166,7 @@ func TestClient_Subscribe_Deduplication(t *testing.T) { // Verify only one topic is stored count := 0 - c.topics.Map.Range(func(key, value interface{}) bool { + c.topics.Range(func(key, value any) bool { count++ return true }) @@ -199,7 +199,7 @@ func TestClient_Subscribe_MultipleStreamingKeys(t *testing.T) { // Verify all three topics are stored separately count := 0 - c.topics.Map.Range(func(key, value interface{}) bool { + c.topics.Range(func(key, value any) bool { count++ return true })