From c3a051dcca79a584dbf7a430fe27b7bc69474bf1 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 16 Oct 2026 07:53:03 +0200 Subject: [PATCH 1/3] Use Sprint for text that isn't a format string Two places pass plain text as the format string of TextStyle.Sprintf without further arguments: the prefix of a disabled menu item's tooltip, and the key binding entries of the options bar. If the text contains a "%", for example in a translation or in a key label, it is mangled into something like "%!(NOVERB)". go vet doesn't report these calls yet. It will once go.mod says go 1.26, because vet then also finds printf wrappers through interface methods. TextStyle.Sprintf forwards to the Sprintf method of the Sprinter interface. Co-Authored-By: Claude Opus 5.5 (1M context) --- pkg/gui/controllers/helpers/confirmation_helper.go | 2 +- pkg/gui/options_map.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/gui/controllers/helpers/confirmation_helper.go b/pkg/gui/controllers/helpers/confirmation_helper.go index 6bfd7ca4e..68d68575e 100644 --- a/pkg/gui/controllers/helpers/confirmation_helper.go +++ b/pkg/gui/controllers/helpers/confirmation_helper.go @@ -505,7 +505,7 @@ func (self *ConfirmationHelper) TooltipForMenuItem(menuItem *types.MenuItem) str if tooltip != "" { tooltip += "\n\n" } - tooltip += style.FgRed.Sprintf(self.c.Tr.DisabledMenuItemPrefix) + menuItem.DisabledReason.Text + tooltip += style.FgRed.Sprint(self.c.Tr.DisabledMenuItemPrefix) + menuItem.DisabledReason.Text } return tooltip } diff --git a/pkg/gui/options_map.go b/pkg/gui/options_map.go index 880a766b8..80b2b7a4f 100644 --- a/pkg/gui/options_map.go +++ b/pkg/gui/options_map.go @@ -127,7 +127,7 @@ func (self *OptionsMapMgr) formatBindingInfos(bindingInfos []bindingInfo) string break } - formatted := info.style.Sprintf(plainText) + formatted := info.style.Sprint(plainText) if i > 0 { builder.WriteString(theme.OptionsFgColor.Sprint(separator)) From 5e3cd6b5408218cc55e8b26df377e3912eea3c8d Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 16 Oct 2026 08:02:28 +0200 Subject: [PATCH 2/3] Set the Go version of the CI workflow in one place Updating Go means editing the go-version of six setup-go steps in ci.yml. The workflow defines a GO_VERSION variable for this, but no step has used it since it was added in a34bdf1a04. Use it in all six steps. Give its value the ".x" suffix so that setup-go keeps picking the latest patch release. This also keeps YAML from reading a version like 1.30 as the number 1.3. release.yml still needs its own update, because env variables don't carry over to other workflows. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f32d4804d..3b1b287f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ name: Continuous Integration env: - GO_VERSION: 1.25 + GO_VERSION: 1.25.x on: push: @@ -32,7 +32,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v7 with: - go-version: 1.25.x + go-version: ${{ env.GO_VERSION }} - name: Test code # we're passing -short so that we skip the integration tests, which will be run in parallel below run: | @@ -95,7 +95,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v7 with: - go-version: 1.25.x + go-version: ${{ env.GO_VERSION }} - name: Print git version run: git --version - name: Test code @@ -132,7 +132,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v7 with: - go-version: 1.25.x + go-version: ${{ env.GO_VERSION }} - name: Build linux binary run: | GOOS=linux go build @@ -159,7 +159,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v7 with: - go-version: 1.25.x + go-version: ${{ env.GO_VERSION }} - name: Check Vendor Directory # ensure our vendor directory matches up with our go modules run: | @@ -185,7 +185,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v7 with: - go-version: 1.25.x + go-version: ${{ env.GO_VERSION }} - name: Check formatting run: ./scripts/gofumpt-check.sh - name: Lint @@ -208,7 +208,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v7 with: - go-version: 1.25.x + go-version: ${{ env.GO_VERSION }} - name: Download all coverage artifacts uses: actions/download-artifact@v8 From 5ef318ef77f0bed4d6a7a9f32d045e998bab426a Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 16 Oct 2026 07:55:41 +0200 Subject: [PATCH 3/3] Update go to 1.26 Dependabot PRs that update golang.org/x modules fail on CI. These modules now require go 1.26, but CI runs 1.25. The golang.org/x modules require the oldest Go release that is still supported, and since Go 1.27 came out, this is 1.26. Stop at 1.26 rather than going to 1.27. The go version in go.mod is the minimum for everyone who builds lazygit from source, and Go 1.27 is only two months old. Also, Go 1.27 requires macOS 13, so release binaries built with it would no longer run on macOS 12. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- .golangci.yml | 2 +- Dockerfile | 2 +- go.mod | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b1b287f7..df8ac7d84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ name: Continuous Integration env: - GO_VERSION: 1.25.x + GO_VERSION: 1.26.x on: push: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7755cc2b..85426e6d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -162,7 +162,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v7 with: - go-version: 1.25.x + go-version: 1.26.x - name: Run goreleaser uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3 diff --git a/.golangci.yml b/.golangci.yml index e6a2f37ab..79db5dbd7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,6 @@ version: "2" run: - go: "1.25" + go: "1.26" issues: max-issues-per-linter: 0 max-same-issues: 0 diff --git a/Dockerfile b/Dockerfile index 8a18ad8d3..9cc163dbc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # docker build -t lazygit . # docker run -it lazygit:latest /bin/sh -FROM golang:1.25 as build +FROM golang:1.26 as build WORKDIR /go/src/github.com/jesseduffield/lazygit/ COPY go.mod go.sum ./ RUN go mod download diff --git a/go.mod b/go.mod index 68aa39cea..35e04cd77 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/jesseduffield/lazygit -go 1.25.0 +go 1.26.0 // This is necessary to ignore test files when executing gofumpt. ignore ./test