Skip to content

feat: go upgrade 1.24#93

Merged
Abdulsametileri merged 1 commit intomainfrom
feature/go-upgrade-1.24
Feb 11, 2026
Merged

feat: go upgrade 1.24#93
Abdulsametileri merged 1 commit intomainfrom
feature/go-upgrade-1.24

Conversation

@ugurcanerdogan
Copy link
Member

@ugurcanerdogan ugurcanerdogan commented Feb 10, 2026

Summary

Upgrades the project-wide Go version from 1.19 to 1.24 and updates all related tooling to ensure full compatibility. Also fixes a nil pointer dereference bug in SetDefaults() that was exposed by Go 1.24's different goroutine scheduling behavior.

Changes

Go Version Upgrade (10 files)

All go.mod files updated from go 1.19 to go 1.24:

File Change
go.mod go 1.19go 1.24
test/integration/go.mod go 1.19go 1.24
examples/single-consumer/go.mod go 1.19go 1.24
examples/single-consumer-with-deadletter/go.mod go 1.19go 1.24
examples/multiple-consumer/go.mod go 1.19go 1.24
examples/single-consumer-with-producer/go.mod go 1.19go 1.24
examples/single-consumer-with-custom-logger/go.mod go 1.19go 1.24
examples/single-consumer-with-metric-collector/go.mod go 1.19go 1.24
examples/single-consumer-with-backoff-strategy/go.mod go 1.19go 1.24
examples/single-consumer-with-header-filter-function/go.mod go 1.19go 1.24

GitHub Workflows (3 files)

  • actions/checkout: v3v4
  • actions/setup-go: v3v4
  • goreleaser-action: v4v5
  • golangci-lint-action: v3v6
  • go-version: 1.191.24
  • golangci-lint version: v1.51v1.64.8

golangci-lint Configuration (2 files)

golangci-lint v1.51 only supports up to Go 1.20. Updated to v1.64.8 (the last v1.x release with Go 1.24 support).

File Change
Makefile v1.51.0v1.64.8
.golangci.yml Removed deprecated service block, removed depguard linter (requires explicit config in v1.64+)

Bug Fix: Nil Logger Panic

Problem: Config.SetDefaults() did not initialize the Logger field. In Go 1.19, tests completed before the cron job (@every 1s) fired, so the nil Logger was never accessed. Go 1.24's different goroutine scheduling caused the cron to fire during tests, triggering a nil pointer dereference at cronsumer_client.go:88.

Fix:

  • pkg/kafka/config.go — Added automatic Logger initialization in SetDefaults() when Logger == nil
  • pkg/kafka/config_test.go — Updated assertion to verify Logger is initialized rather than expecting nil

Lint Fixes (2 files)

The newer golangci-lint version introduced stricter checks:

File Fix
internal/cronsumer_test.go 7 unused-parameter fixes (message_, ctx_, etc.)
internal/cronsumer_client_test.go 3 unused-parameter fixes (message_)

@ugurcanerdogan ugurcanerdogan self-assigned this Feb 10, 2026
@ugurcanerdogan ugurcanerdogan added enhancement New feature or request dependencies Pull requests that update a dependency file labels Feb 10, 2026
@ugurcanerdogan ugurcanerdogan force-pushed the feature/go-upgrade-1.24 branch from 3bf423b to b0acb03 Compare February 10, 2026 19:28
@ugurcanerdogan ugurcanerdogan marked this pull request as ready for review February 10, 2026 19:32
@Abdulsametileri Abdulsametileri merged commit 31f3467 into main Feb 11, 2026
3 checks passed
@Abdulsametileri Abdulsametileri deleted the feature/go-upgrade-1.24 branch February 11, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants