From 8cddc72fcc4568d778315b9eba976b5eba350c1c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 14 Jan 2026 11:41:28 +0100 Subject: [PATCH 1/6] ToBytes: fix error capitalization (staticcheck) Signed-off-by: Sebastiaan van Stijn --- ascii.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ascii.go b/ascii.go index 55873c0..9075888 100644 --- a/ascii.go +++ b/ascii.go @@ -56,7 +56,7 @@ next: if key == "DEL" { codes = append(codes, 127) } else { - return nil, fmt.Errorf("Unknown character: '%s'", key) + return nil, fmt.Errorf("unknown character: '%s'", key) } } else { codes = append(codes, key[0]) From 0a76fb46438e1c932ad278934908290a1fc00c79 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 14 Jan 2026 12:04:31 +0100 Subject: [PATCH 2/6] cleanup gitignore Signed-off-by: Sebastiaan van Stijn --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index b0747ff..417df5f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,5 @@ # if you want to ignore files created by your editor/tools, consider using a # global .gitignore or .git/info/exclude see https://help.github.com/articles/ignoring-files -.* -!.github -!.gitignore profile.out # support running go modules in vendor mode for local development vendor/ From 20d7df690d4a346131efae909da4df66d0fac1c5 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 14 Jan 2026 12:05:17 +0100 Subject: [PATCH 3/6] gha: update golangci-lint to v2.8 Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 5 +---- .golangci.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 .golangci.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c0103e..da425a6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,7 +43,4 @@ jobs: - name: Lint run: | docker run --rm -v ./:/go/src/github.com/moby/term -w /go/src/github.com/moby/term \ - golangci/golangci-lint:v1.62.2 golangci-lint run -v \ - -E gofmt \ - -E misspell \ - -E revive + golangci/golangci-lint:v2.8-alpine golangci-lint run -v diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..652b021 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,29 @@ +version: "2" + +linters: + enable: + - errorlint + - gosec + - misspell + - revive + - unconvert + - unparam + exclusions: + generated: disable + presets: + - comments + - std-error-handling + settings: + staticcheck: + # Enable all options, with some exceptions. + # For defaults, see https://golangci-lint.run/usage/linters/#staticcheck + checks: + - all + - -QF1008 # Omit embedded fields from selector expression; https://staticcheck.dev/docs/checks/#QF1008 + - -ST1003 # Poorly chosen identifier; https://staticcheck.dev/docs/checks/#ST1003 + +formatters: + enable: + - gofumpt + exclusions: + generated: disable From 58a82dd15a7bc4a24654546d8d7d2e2e8fc33586 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 14 Jan 2026 12:06:27 +0100 Subject: [PATCH 4/6] gha: update actions/setup-go to v6 Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da425a6..71ef40f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ matrix.platform }} steps: - name: Install Go ${{ matrix.go }} - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: go-version: ${{ matrix.go }} - name: Checkout code From 3735f92ac45a75e5f03b167bcdb41b1a7d09e7fa Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 14 Jan 2026 12:07:43 +0100 Subject: [PATCH 5/6] gha: update actions/checkout to v6 Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 71ef40f..bafef8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,14 +28,14 @@ jobs: with: go-version: ${{ matrix.go }} - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Test run: go test -v ./... lint: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: go mod tidy run: | go mod tidy From 48deb7e917bf312277826fadc2b93754ebd74668 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 14 Jan 2026 12:08:20 +0100 Subject: [PATCH 6/6] gha: test on go1.18, oldstable, and stable Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bafef8b..e0cc879 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: test: strategy: matrix: - go: ["1.18.x", "1.22.x", "1.23.x"] + go: ["1.18.x", "oldstable", "stable"] platform: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.platform }} steps: