Migrate golangci-lint to v2 and update Go version (#1965)

* migrate golangci-lint to v2 and update go version

- migrated .golangci.yml to version 2 format
- updated go.mod from 1.23.0 to 1.24
- removed deprecated run.timeout configuration

* update to go 1.25 and baseimage v1.17.0

- updated go.mod to go 1.25
- updated Dockerfile to use buildgo-v1.17.0 (go 1.25.0)
- updated Dockerfile to use app-v1.17.0

* fix flaky tests with proper synchronization

- use assert.Eventually instead of fixed sleep in TestService_Many
- wait for webhook before shutdown in TestMain_WithWebhook
- fixes race conditions exposed by Go 1.25 scheduler changes

* fix data race in MockDest.closed field

- add IsClosed() method with proper locking
- add locking to String() method
- use IsClosed() in tests instead of direct field access
- fixes race condition detected by go test -race

* update example go.mod to go 1.25

* update golangci-lint to v2.6.0 for go 1.25 support

* fix linter issue and update CLAUDE.md

- merge conditional assignment in example accessor/data.go
- add reminder in CLAUDE.md to always test and lint examples before committing

* update example Dockerfile to baseimage v1.17.0 for go 1.25
This commit is contained in:
Umputun
2025-11-02 14:17:39 -06:00
committed by GitHub
parent 8112f445f4
commit 34ea4c3e83
11 changed files with 85 additions and 73 deletions
+5 -5
View File
@@ -32,7 +32,7 @@ jobs:
- name: install go
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version: "1.25"
cache-dependency-path: backend
- name: test and build backend
@@ -53,15 +53,15 @@ jobs:
TZ: "America/Chicago"
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: "v1.64.7"
version: "v2.6.0"
working-directory: backend/app
- name: golangci-lint on example directory
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: "v1.64.7"
version: "v2.6.0"
args: --config ../../.golangci.yml
working-directory: backend/_example/memory_store