From 87a4d74666d91949b51ff2815aa2ad4f87f3a678 Mon Sep 17 00:00:00 2001 From: Tetsuro Mikami Date: Tue, 27 Oct 2026 09:56:51 +0900 Subject: [PATCH 1/3] ci: pin golangci-lint to v2.15.0 --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a36764..a2e06b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,8 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v9 + with: + version: v2.15.0 test: runs-on: ubuntu-latest From 49cdfc93fd9c73795bc106594bc0c19a0405eda1 Mon Sep 17 00:00:00 2001 From: Tetsuro Mikami Date: Tue, 27 Oct 2026 09:56:51 +0900 Subject: [PATCH 2/3] chore: address golangci-lint v2.15.0 findings --- .golangci.yaml | 1 + config/config_test.go | 2 +- proxy/mysql/conn.go | 5 ++--- proxy/postgres/conn.go | 5 ++--- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index c939cd1..27dbf20 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -33,6 +33,7 @@ linters: - dupl # High false-positive rate in test suites where setup code is similar - err113 # Sentinel errors are used where meaningful; contextual fmt.Errorf is preferred elsewhere - exhaustruct # Hinders use of default values; too boilerplate-heavy for large structs + - exhaustruct_v5 # Same as exhaustruct - forbidigo # Essential for CLI tools that rely on fmt.Print for user output - funlen # Testing logic and table-driven tests naturally exceed standard length - gochecknoglobals # Necessary for certain package-level configurations or singleton patterns diff --git a/config/config_test.go b/config/config_test.go index c4923b8..9b1ac5f 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -116,7 +116,7 @@ upstream: "localhost:3306" } } -func TestLoad_NoDefaultFile(t *testing.T) { //nolint:paralleltest // t.Chdir is incompatible with t.Parallel +func TestLoad_NoDefaultFile(t *testing.T) { t.Chdir(t.TempDir()) cfg, err := config.Load("") diff --git a/proxy/mysql/conn.go b/proxy/mysql/conn.go index 0355f89..f9893eb 100644 --- a/proxy/mysql/conn.go +++ b/proxy/mysql/conn.go @@ -314,7 +314,7 @@ func (c *conn) relay(ctx context.Context) error { err := <-errCh _ = c.clientConn.Close() _ = c.upstreamConn.Close() - <-errCh + <-errCh //nolint:errcheck // only waiting for the other goroutine to exit return err } @@ -753,8 +753,7 @@ func isClosedErr(err error) bool { if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { return true } - var netErr *net.OpError - if errors.As(err, &netErr) { + if netErr, ok := errors.AsType[*net.OpError](err); ok { return netErr.Err.Error() == "use of closed network connection" } return strings.Contains(err.Error(), "closed") diff --git a/proxy/postgres/conn.go b/proxy/postgres/conn.go index e9f9171..9ea907b 100644 --- a/proxy/postgres/conn.go +++ b/proxy/postgres/conn.go @@ -111,7 +111,7 @@ func (c *conn) relay(ctx context.Context) error { _ = c.clientConn.Close() _ = c.upstreamConn.Close() // Wait for the second goroutine. - <-errCh + <-errCh //nolint:errcheck // only waiting for the other goroutine to exit return err } @@ -552,8 +552,7 @@ func isClosedErr(err error) bool { if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { return true } - var netErr *net.OpError - if errors.As(err, &netErr) { + if netErr, ok := errors.AsType[*net.OpError](err); ok { return netErr.Err.Error() == "use of closed network connection" } return strings.Contains(err.Error(), "closed") From 92d4213572e5ee4959c448d0dc026255b349cc0e Mon Sep 17 00:00:00 2001 From: Tetsuro Mikami Date: Tue, 27 Oct 2026 09:56:51 +0900 Subject: [PATCH 3/3] build: stop publishing formula to mickamy/tap --- .github/workflows/release.yml | 1 - .goreleaser.yaml | 20 -------------------- 2 files changed, 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37ada7f..49e8bbf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,4 +29,3 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} - MICKAMY_GITHUB_TOKEN: ${{ secrets.MICKAMY_GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index eef41ff..d10f0c8 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -54,25 +54,5 @@ homebrew_casks: name: homebrew-tap token: "{{ .Env.TAP_GITHUB_TOKEN }}" -# Points existing mickamy/tap users to the cask. Remove after the migration release. -brews: - - name: sql-tap - homepage: https://github.com/proto-tap/sql-tap - description: Watch SQL traffic in real-time with a TUI - directory: Formula - install: | - bin.install "sql-tap" - bin.install "sql-tapd" - custom_block: | - disable! date: "2027-04-27", because: "has moved to the proto-tap/tap cask", replacement_cask: "proto-tap/tap/sql-tap" - caveats: | - sql-tap has moved to the proto-tap/tap cask. Switch with: - brew uninstall sql-tap - brew install --cask proto-tap/tap/sql-tap - repository: - owner: mickamy - name: homebrew-tap - token: "{{ .Env.MICKAMY_GITHUB_TOKEN }}" - changelog: sort: asc