Fix golangci-lint failure by updating Go version to 1.18#46
Conversation
golangci-lint 2.11.2 が `-buildvcs` フラグを使用するが、このフラグは Go 1.18 で追加された。 go.mod の Go バージョンを 1.17 から 1.18 に更新することで修正する。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
CI の golangci-lint 失敗(Go 1.17 環境で -buildvcs が未対応)を解消するため、リポジトリの最小 Go バージョンを 1.18 に引き上げる変更です。
Changes:
go.modのgoディレクティブを1.17から1.18に更新
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| module github.com/socialplusjp/datadog-sidekiq | ||
|
|
||
| go 1.17 | ||
| go 1.18 |
There was a problem hiding this comment.
After raising the go directive to 1.18, the stated development requirement in README.md is now outdated (it currently says Go >= 1.17.0). Consider updating the documentation to reflect the new minimum supported Go version.
| go 1.18 | |
| go 1.17 |
| module github.com/socialplusjp/datadog-sidekiq | ||
|
|
||
| go 1.17 | ||
| go 1.18 |
There was a problem hiding this comment.
go.mod now requires Go 1.18, but the Docker build still uses FROM golang:1.17-alpine as builder (Dockerfile:1). With this change, go build in the Dockerfile will fail because Go 1.17 can’t build modules declaring go 1.18. Please bump the builder image to Go 1.18+ (and ensure the release workflow’s Docker build continues to succeed).
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Note
Generated by claude-code
Why?
golangci-lint 2.11.2 uses the
-buildvcsflag internally, which was introduced in Go 1.18.Since
go.modspecifiedgo 1.17,actions/setup-goset up Go 1.17 and CI failed with:How?
Updated the
godirective ingo.modfrom1.17to1.18.