Bump Go toolchain to 1.26.4#2705
Open
SamMorrowDrums wants to merge 1 commit into
Open
Conversation
Move the project from the Go 1.25 line to the latest stable Go 1.26.4. - go.mod: go directive 1.25.0 -> 1.26.0 (language floor; no toolchain directive introduced by `go mod tidy`) - Dockerfile: golang:1.25.11-alpine -> golang:1.26.4-alpine, repinned to the current index digest - .github/workflows/lint.yml: go-version 1.25 -> 1.26 (other workflows use go-version-file: go.mod and follow automatically) - .github/copilot-instructions.md: update Dockerfile reference - .golangci.yml: disable only the modernize `newexpr` analyzer; the Go 1.26 new(expr) feature otherwise flags ~1.2k github.Ptr() call sites, which is out of scope for a toolchain bump Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates this repository’s Go version baseline and tooling configuration to move from the Go 1.25 line to Go 1.26, and updates build/CI pins accordingly.
Changes:
- Bump
go.modlanguage version to Go 1.26.0. - Update the Docker build stage to
golang:1.26.4-alpine(digest pinned) and adjust CI lint workflow’s Go setup. - Configure
golangci-lintto disable onlymodernize’snewexpranalyzer to avoid a large out-of-scope rewrite.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Raises the module’s Go language version floor to 1.26.0. |
| Dockerfile | Updates the builder image to Go 1.26.4 (digest pinned). |
| .golangci.yml | Disables only modernize’s newexpr analyzer while keeping modernize enabled. |
| .github/workflows/lint.yml | Updates the lint workflow’s Go version selection for Go 1.26. |
| .github/copilot-instructions.md | Updates contributor guidance to reference the new Docker Go version. |
Copilot's findings
- Files reviewed: 5/5 changed files
- Comments generated: 3
Comment on lines
1
to
4
| module github.com/github/github-mcp-server | ||
|
|
||
| go 1.25.0 | ||
| go 1.26.0 | ||
|
|
Comment on lines
19
to
22
| - uses: actions/setup-go@v6 | ||
| with: | ||
| go-version: '1.25' | ||
| go-version: '1.26' | ||
| - name: golangci-lint |
Comment on lines
95
to
+97
| - **go.mod / go.sum:** Go module dependencies (Go 1.24.0+) | ||
| - **.golangci.yml:** Linter configuration (v2 format, ~15 linters enabled) | ||
| - **Dockerfile:** Multi-stage build (golang:1.25.8-alpine → distroless) | ||
| - **Dockerfile:** Multi-stage build (golang:1.26.4-alpine → distroless) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves the project from the Go 1.25 line to the latest stable Go 1.26.4. This is a deliberate minor-version bump, so it gets its own PR with full CI rather than an admin/digest-only update.
Pins changed
go.modgo 1.25.0go 1.26.0(language floor)Dockerfilegolang:1.25.11-alpine@sha256:8d95af53…golang:1.26.4-alpine@sha256:f1ddd9fe14fffc091dd98cb4bfa999f32c5fc77d2f2305ea9f0e2595c5437c14.github/workflows/lint.ymlgo-version: '1.25'go-version: '1.26'.github/copilot-instructions.mdgolang:1.25.8-alpinereferencegolang:1.26.4-alpine.golangci.ymlmodernizenewexpranalyzer (see below)Notes:
toolchaindirective was added —go mod tidydid not introduce one.docker buildx imagetools inspect golang:1.26.4-alpine), verified by pulling it and runninggo version→go1.26.4.go-version-file: go.mod(go.yml,docs-check.yml,goreleaser.yml,license-check.yml,mcp-diff.yml), so they pick up 1.26 automatically. Onlylint.ymlpinned a literal version, now updated.registry-releaser.ymlusesgo-version: "stable"andcode-scanning.ymlresolves from CodeQL config — both unaffected.New Go 1.26 lint finding — and why it's scoped out
Bumping
go.modto 1.26 enables themodernizenewexprmodernizer (the newnew(expr)builtin). golangci-lint'smax-same-issues: 3made it look like only 11 findings, but it actually flags ~1,176github.Ptr(...)→new(...)rewrites across 33 files. That's a sweeping, unrelated refactor — out of scope for a toolchain bump.Rather than churn the whole codebase or blanket-disable a linter, I disabled only the
newexpranalyzer in.golangci.yml(all othermodernizechecks stay active). Adoptingnew(expr)can be done later as a separate, focused change. Flagging for maintainer review in case you'd prefer the wholesale adoption instead.No other new
go vet/ staticcheck / golangci-lint findings appeared.Validation
go mod tidy— clean, no toolchain directive addedgo build ./...— ✅script/lint(gofmt + golangci-lint v2.9) — ✅0 issuesscript/test(go test -race ./...) — ✅ all packages passscript/generate-docs— README.md already current (no change). Two unrelated docs files (docs/feature-flags.md,docs/insiders-features.md) showed pre-existing drift unrelated to this bump and were intentionally left untouched to keep the PR focused.go1.26.4.Please let full CI validate — do not force-merge.