Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:

- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.15.0

test:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
1 change: 1 addition & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 0 additions & 20 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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("")
Expand Down
5 changes: 2 additions & 3 deletions proxy/mysql/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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")
Expand Down
5 changes: 2 additions & 3 deletions proxy/postgres/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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")
Expand Down
Loading