Skip to content

Keep go.mod at minimum supported Go version, test CI against min and latest#14

Open
prasanna-anchorage wants to merge 1 commit into
mainfrom
chore/go-version-matrix
Open

Keep go.mod at minimum supported Go version, test CI against min and latest#14
prasanna-anchorage wants to merge 1 commit into
mainfrom
chore/go-version-matrix

Conversation

@prasanna-anchorage

Copy link
Copy Markdown
Contributor

Summary

  • go.mod's go directive is set to 1.22 — the actual floor required by this module's dependencies (urfave/cli/v3 requires go1.22) and its own code, rather than the latest toolchain. A high go directive forces every downstream consumer to upgrade their toolchain for no reason.
  • CI now runs a matrix across 1.22 (declared minimum) and 1.26 (latest), so both are verified on every push/PR. Linting only runs once, on the latest leg.

Test plan

  • go build ./... passes with go 1.22 directive
  • go vet ./... passes (no use of post-1.22 language features)
  • go test ./... passes (122 tests, 3 packages)
  • CI matrix runs both Go versions on this PR

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

…latest

The go directive only needs to reflect the actual floor required by the
module and its dependencies (urfave/cli/v3 requires go1.22; nothing in
this codebase uses newer language features), not the latest toolchain.
Setting it higher forces every downstream consumer to upgrade for no
reason. CI now runs a matrix across the declared minimum (1.22) and
latest (1.26) so both are verified; lint only runs once, on latest.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 15, 2026 21:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the module’s declared Go language version to the minimum actually required by dependencies, and adjusts CI to validate the project against both the minimum and a latest Go toolchain.

Changes:

  • Lower go.mod go directive from 1.25.0 to 1.22.
  • Add a Go version matrix to CI to run checks/tests on Go 1.22 and 1.26.
  • Run golangci-lint only on the latest Go leg to avoid duplicated lint work.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
go.mod Sets the module go directive to the minimum supported Go version (1.22).
.github/workflows/ci.yml Adds a Go version matrix (min + latest) and gates linting to the latest leg.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants