Repository: xataio/pgstream
Pull request #214 (2025-03-28 09:10:31)

Update golangci-lint
Update golangci-lint to v2.0.2. The golangci.lint.yml config has been migrated according to the [migration guide](https://golangci-lint.run/product/migration-guide/). The lint errors have been corrected.

This should fix the issues when running the lint step on CI when using golang 1.24+ (hit by dependabot PRs).


Patch:
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 28a6c99..6090a50 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -5,7 +5,7 @@
 
 version: 2
 updates:
-  - package-ecosystem: "gomod" 
+  - package-ecosystem: "gomod"
     directory: "/"
     schedule:
       interval: "weekly"
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 46e8ee8..6795a48 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -60,18 +60,18 @@ jobs:
           cache: false
 
       - name: golangci-lint
-        uses: golangci/golangci-lint-action@v4
+        uses: golangci/golangci-lint-action@v7
         with:
           # Require: The version of golangci-lint to use.
           # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
           # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
-          version: v1.60.1
+          version: v2.0.2
 
           # Optional: golangci-lint command line arguments.
           #
           # Note: By default, the `.golangci.yml` file should be at the root of the repository.
           # The location of the configuration file can be changed by using `--config=`
-          args: --timeout=30m --out-format=colored-line-number --config=.golangci.yml
+          args: --timeout=30m --config=.golangci.yml
   coverage:
     if: github.event_name == 'pull_request' # Do not run when workflow is triggered by push to main branch
     runs-on: ubuntu-latest
diff --git a/.golangci.yml b/.golangci.yml
index 7c4204c..a2bebc6 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,23 +1,17 @@
-goVersion: &goVersion "1.22"
-
+version: "2"
 run:
-  go: *goVersion
-  timeout: 30m
-
+  go: "1.24"
 linters:
-  disable-all: true
-  # Enable specific linter
-  # https://golangci-lint.run/usage/linters/#enabled-by-default-linters
+  default: none
   enable:
+    - copyloopvar
     - errorlint
-    - exportloopref
     - forbidigo
     - forcetypeassert
+    - gochecksumtype
     - goconst
     - gocritic
-    - gofumpt
     - gosec
-    - gosimple
     - govet
     - ineffassign
     - makezero
@@ -26,59 +20,65 @@ linters:
     - nolintlint
     - prealloc
     - staticcheck
-    - stylecheck
     - unused
-    - gochecksumtype
-
-linters-settings:
-  errorlint:
-    errorf: true
-
-  forbidigo:
-    forbid:
-      - fmt.Print*
-  gomodguard:
-    blocked:
-      # List of blocked modules.
-      modules:
-        # Blocked module.
-        - github.com/pkg/errors:
-            # Recommended modules that should be used instead. (Optional)
-            recommendations:
-              - errors
-              - fmt
-            reason: "This package is deprecated, use `fmt.Errorf` with `%w` instead"
-
-  goconst:
-    ignore-tests: true
-    numbers: true
-
-  gocritic:
-    disabled-checks:
-      - exitAfterDefer
-      - ifElseChain
-      - commentFormatting
-
-  gofumpt:
-    run.go: *goVersion
-    module-path: "pgstream"
-    extra-rules: false
-
-  staticcheck:
-    run.go: *goVersion
-    checks: ["all", "-SA1019"]
-
-  stylecheck:
-    run.go: *goVersion
-    checks: ["all", "-ST1000", "-ST1005"]
-
-  unused:
-    go: *goVersion
-
-  makezero:
-    always: false
-
-  gosec:
-    exclude-generated: true
-    severity: low
-    includes: []
+  settings:
+    errorlint:
+      errorf: true
+    forbidigo:
+      forbid:
+        - pattern: fmt.Print*
+    goconst:
+      numbers: true
+    gocritic:
+      disabled-checks:
+        - exitAfterDefer
+        - ifElseChain
+        - commentFormatting
+    gomodguard:
+      blocked:
+        modules:
+          - github.com/pkg/errors:
+              recommendations:
+                - errors
+                - fmt
+              reason: This package is deprecated, use `fmt.Errorf` with `%w` instead
+    gosec:
+      excludes:
+        - G115
+      severity: low
+    makezero:
+      always: false
+    staticcheck:
+      checks:
+        - -SA1019
+        - -ST1000
+        - -ST1005
+        - all
+  exclusions:
+    generated: lax
+    presets:
+      - comments
+      - common-false-positives
+      - legacy
+      - std-error-handling
+    rules:
+      - linters:
+          - goconst
+        path: (.+)_test\.go
+    paths:
+      - third_party$
+      - builtin$
+      - examples$
+formatters:
+  enable:
+    - gofumpt
+  settings:
+    gofumpt:
+      module-path: pgstream
+      extra-rules: false
+  exclusions:
+    generated: lax
+    paths:
+      - third_party$
+      - builtin$
+      - examples$
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 02e776c..4a88d04 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -11,7 +11,7 @@ repos:
       - id: check-executables-have-shebangs
       - id: check-merge-conflict
   - repo: https://github.com/golangci/golangci-lint
-    rev: v1.60.1
+    rev: v2.0.2
     hooks:
       - id: golangci-lint-full
         args: ["--timeout=10m", "--config=.golangci.yml"]
diff --git a/Makefile b/Makefile
index de8e6b8..c864f35 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 .PHONY: lint
 lint: ## Lint source code
 	@echo "Linting source code..."
-	@go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.1
+	@go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.0.2
 	@golangci-lint run
 
 .PHONY: test
diff --git a/go.mod b/go.mod
index 799fc49..1a2ae83 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
 module github.com/xataio/pgstream
 
-go 1.23.2
+go 1.24.1
 
 require (
 	github.com/bytedance/sonic v1.12.3
@@ -27,11 +27,11 @@ require (
 	github.com/spf13/cobra v1.8.1
 	github.com/spf13/viper v1.19.0
 	github.com/stretchr/testify v1.10.0
-	github.com/testcontainers/testcontainers-go v0.35.0
+	github.com/testcontainers/testcontainers-go v0.36.0
 	github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.33.0
-	github.com/testcontainers/testcontainers-go/modules/kafka v0.31.0
-	github.com/testcontainers/testcontainers-go/modules/opensearch v0.31.0
-	github.com/testcontainers/testcontainers-go/modules/postgres v0.35.0
+	github.com/testcontainers/testcontainers-go/modules/kafka v0.36.0
+	github.com/testcontainers/testcontainers-go/modules/opensearch v0.36.0
+	github.com/testcontainers/testcontainers-go/modules/postgres v0.36.0
 	go.opentelemetry.io/otel v1.35.0
 	go.opentelemetry.io/otel/metric v1.35.0
 	go.opentelemetry.io/otel/trace v1.35.0
@@ -64,9 +64,10 @@ require (
 	github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
 	github.com/dchest/siphash v1.2.3 // indirect
 	github.com/distribution/reference v0.6.0 // indirect
-	github.com/docker/docker v27.5.1+incompatible // indirect
+	github.com/docker/docker v28.0.1+incompatible // indirect
 	github.com/docker/go-connections v0.5.0 // indirect
 	github.com/docker/go-units v0.5.0 // indirect
+	github.com/ebitengine/purego v0.8.2 // indirect
 	github.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect
 	github.com/expr-lang/expr v1.17.0 // indirect
 	github.com/felixge/httpsnoop v1.0.4 // indirect
@@ -111,7 +112,7 @@ require (
 	github.com/moby/term v0.5.2 // indirect
 	github.com/morikuni/aec v1.0.0 // indirect
 	github.com/opencontainers/go-digest v1.0.0 // indirect
-	github.com/opencontainers/image-spec v1.1.0 // indirect
+	github.com/opencontainers/image-spec v1.1.1 // indirect
 	github.com/pelletier/go-toml/v2 v2.2.3 // indirect
 	github.com/pierrec/lz4/v4 v4.1.21 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
@@ -121,8 +122,7 @@ require (
 	github.com/sagikazarmark/locafero v0.7.0 // indirect
 	github.com/sagikazarmark/slog-shim v0.1.0 // indirect
 	github.com/segmentio/ksuid v1.0.4 // indirect
-	github.com/shirou/gopsutil/v3 v3.24.5 // indirect
-	github.com/shoenig/go-m1cpu v0.1.6 // indirect
+	github.com/shirou/gopsutil/v4 v4.25.1 // indirect
 	github.com/shopspring/decimal v1.4.0 // indirect
 	github.com/sirupsen/logrus v1.9.3 // indirect
 	github.com/sourcegraph/conc v0.3.0 // indirect
@@ -156,7 +156,7 @@ require (
 	golang.org/x/crypto v0.35.0 // indirect
 	golang.org/x/mod v0.22.0 // indirect
 	golang.org/x/net v0.36.0 // indirect
-	golang.org/x/sys v0.30.0 // indirect
+	golang.org/x/sys v0.31.0 // indirect
 	golang.org/x/term v0.29.0 // indirect
 	golang.org/x/text v0.22.0 // indirect
 	golang.org/x/time v0.9.0 // indirect
diff --git a/go.sum b/go.sum
index 88b8c65..692b46c 100644
--- a/go.sum
+++ b/go.sum
@@ -86,8 +86,8 @@ github.com/dhui/dktest v0.4.3 h1:wquqUxAFdcUgabAVLvSCOKOlag5cIZuaOjYIBOWdsR0=
 github.com/dhui/dktest v0.4.3/go.mod h1:zNK8IwktWzQRm6I/l2Wjp7MakiyaFWv4G1hjmodmMTs=
 github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
 github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
-github.com/docker/docker v27.5.1+incompatible h1:4PYU5dnBYqRQi0294d1FBECqT9ECWeQAIfE8q4YnPY8=
-github.com/docker/docker v27.5.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0=
+github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
 github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
 github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
 github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
@@ -98,6 +98,8 @@ github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4A
 github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0=
 github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
+github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I=
+github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
 github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA=
 github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk=
 github.com/elastic/go-elasticsearch/v8 v8.14.0 h1:1ywU8WFReLLcxE1WJqii3hTtbPUE2hc38ZK/j4mMFow=
@@ -290,8 +292,8 @@ github.com/nucleuscloud/neosync v0.5.15 h1:R+i0lngQx366i2zKcLPea5ncb/W31xPcdile4
 github.com/nucleuscloud/neosync v0.5.15/go.mod h1:XBtHfi3uiP+PoIkPm0rc9zUFG+ODvEJOVfDid01g8/8=
 github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
-github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
-github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
+github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
+github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
 github.com/opensearch-project/opensearch-go v1.1.0 h1:eG5sh3843bbU1itPRjA9QXbxcg8LaZ+DjEzQH9aLN3M=
 github.com/opensearch-project/opensearch-go v1.1.0/go.mod h1:+6/XHCuTH+fwsMJikZEWsucZ4eZMma3zNSeLrTtVGbo=
 github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
@@ -348,12 +350,8 @@ github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c
 github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE=
 github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
 github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
-github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI=
-github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk=
-github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=
-github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ=
-github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU=
-github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k=
+github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs=
+github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI=
 github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
 github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
 github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
@@ -389,16 +387,16 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
 github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
 github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
 github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
-github.com/testcontainers/testcontainers-go v0.35.0 h1:uADsZpTKFAtp8SLK+hMwSaa+X+JiERHtd4sQAFmXeMo=
-github.com/testcontainers/testcontainers-go v0.35.0/go.mod h1:oEVBj5zrfJTrgjwONs1SsRbnBtH9OKl+IGl3UMcr2B4=
+github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00=
+github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0=
 github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.33.0 h1:tVsooNzk7SgYDO1OnqeIgihDYiD/vSBNBqwqCfauIJY=
 github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.33.0/go.mod h1:qmspvRf+Hx0iyqKQUmTg1jTNiO7HHGNrx98t/HksVfg=
-github.com/testcontainers/testcontainers-go/modules/kafka v0.31.0 h1:8B1u+sDwYhTUoMI271wPjnCg9mz3dHGLMWpP7YyF7kE=
-github.com/testcontainers/testcontainers-go/modules/kafka v0.31.0/go.mod h1:W1+yLUfUl8VLTzvmApP2FBHgCk8I5SKKjDWjxWEc33U=
-github.com/testcontainers/testcontainers-go/modules/opensearch v0.31.0 h1:sgo2PJb8oCK7ogJjRxAkidXmt+gPzwtyhZpaxSI5wDo=
-github.com/testcontainers/testcontainers-go/modules/opensearch v0.31.0/go.mod h1:l4Z7QqGpdk4wTTQk8J8CZ75pfqAz1dizm+LECOLuNVw=
-github.com/testcontainers/testcontainers-go/modules/postgres v0.35.0 h1:eEGx9kYzZb2cNhRbBrNOCL/YPOM7+RMJiy3bB+ie0/I=
-github.com/testcontainers/testcontainers-go/modules/postgres v0.35.0/go.mod h1:hfH71Mia/WWLBgMD2YctYcMlfsbnT0hflweL1dy8Q4s=
+github.com/testcontainers/testcontainers-go/modules/kafka v0.36.0 h1:hLCfEjGnoy0Z5taxpjSVzJMKmEamLLes7+MVyYb9B1I=
+github.com/testcontainers/testcontainers-go/modules/kafka v0.36.0/go.mod h1:rrTIX8HBerqX/oeSJ7H6l/E7s0BuMZLcmrCGBzIkp/8=
+github.com/testcontainers/testcontainers-go/modules/opensearch v0.36.0 h1:U3juX+m3zkg/oh8TB1twjcN7GSSo10EtMlaX0m1nzOg=
+github.com/testcontainers/testcontainers-go/modules/opensearch v0.36.0/go.mod h1:Sy9q3TdIVKnFdJE+AuCE90ocD+ReKkIZNV2/B6T/oEk=
+github.com/testcontainers/testcontainers-go/modules/postgres v0.36.0 h1:xTGNNsOD9IIssH0dnAGNUH+SD9GYWyaP2t5xD2lg0as=
+github.com/testcontainers/testcontainers-go/modules/postgres v0.36.0/go.mod h1:WKS3MGq1lzbVibIRnL08TOaf5bKWPxJe5frzyQfV4oY=
 github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
 github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
 github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
@@ -531,8 +529,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
-golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
+golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
diff --git a/internal/postgres/pg_conn_pool.go b/internal/postgres/pg_conn_pool.go
index 356dd5b..4c0c0af 100644
--- a/internal/postgres/pg_conn_pool.go
+++ b/internal/postgres/pg_conn_pool.go
@@ -47,7 +47,7 @@ func (c *Pool) ExecInTx(ctx context.Context, fn func(Tx) error) error {
 }
 
 func (c *Pool) ExecInTxWithOptions(ctx context.Context, fn func(Tx) error, opts TxOptions) error {
-	tx, err := c.Pool.BeginTx(ctx, toTxOptions(opts))
+	tx, err := c.BeginTx(ctx, toTxOptions(opts))
 	if err != nil {
 		return mapError(err)
 	}
diff --git a/pkg/schemalog/log_entry.go b/pkg/schemalog/log_entry.go
index b26b95f..f8ddaeb 100644
--- a/pkg/schemalog/log_entry.go
+++ b/pkg/schemalog/log_entry.go
@@ -126,7 +126,7 @@ func (s *SchemaCreatedAtTimestamp) Scan(src interface{}) error {
 }
 
 func (s SchemaCreatedAtTimestamp) TimestampValue() (pgtype.Timestamp, error) {
-	return pgtype.Timestamp{Time: s.Time.UTC(), Valid: true}, nil
+	return pgtype.Timestamp{Time: s.UTC(), Valid: true}, nil
 }
 
 func (s SchemaCreatedAtTimestamp) MarshalJSON() ([]byte, error) {
diff --git a/pkg/snapshot/generator/postgres/data/pg_snapshot_generator.go b/pkg/snapshot/generator/postgres/data/pg_snapshot_generator.go
index d356e0e..618ca3f 100644
--- a/pkg/snapshot/generator/postgres/data/pg_snapshot_generator.go
+++ b/pkg/snapshot/generator/postgres/data/pg_snapshot_generator.go
@@ -245,7 +245,7 @@ func (sg *SnapshotGenerator) toSnapshotColumns(fieldDescriptions []pgconn.FieldD
 func (sg *SnapshotGenerator) getTablePageCount(ctx context.Context, schemaName, tableName, snapshotID string) (uint, error) {
 	pageCount := uint(0)
 	err := sg.execInSnapshotTx(ctx, snapshotID, func(tx pglib.Tx) error {
-		query := "SELECT c.relpages FROM pg_class c JOIN pg_namespace n ON c.relnamespace=n.oid WHERE c.relname=$1 and n.nspname=$2"
+		const query = "SELECT c.relpages FROM pg_class c JOIN pg_namespace n ON c.relnamespace=n.oid WHERE c.relname=$1 and n.nspname=$2"
 		if err := tx.QueryRow(ctx, query, tableName, schemaName).Scan(&pageCount); err != nil {
 			return fmt.Errorf("getting page count for table %s.%s: %w", schemaName, tableName, err)
 		}
diff --git a/pkg/wal/processor/postgres/postgres_wal_ddl_adapter.go b/pkg/wal/processor/postgres/postgres_wal_ddl_adapter.go
index 7fc09e7..a9b7069 100644
--- a/pkg/wal/processor/postgres/postgres_wal_ddl_adapter.go
+++ b/pkg/wal/processor/postgres/postgres_wal_ddl_adapter.go
@@ -197,9 +197,9 @@ func (a *ddlAdapter) buildAlterColumnQueries(schemaName, tableName string, colum
 
 	if columnDiff.DefaultChange != nil {
 		alterQuery := ""
-		switch {
+		switch columnDiff.DefaultChange.New {
 		// removing the default
-		case columnDiff.DefaultChange.New == nil:
+		case nil:
 			alterQuery = fmt.Sprintf("ALTER TABLE %s ALTER COLUMN %s DROP DEFAULT",
 				quotedTableName(schemaName, tableName),
 				columnDiff.ColumnName,


Test patch:
diff --git a/internal/postgres/pg_test.go b/internal/postgres/pg_test.go
index e2fe44b..bac9f9c 100644
--- a/internal/postgres/pg_test.go
+++ b/internal/postgres/pg_test.go
@@ -30,7 +30,6 @@ func Test_DefaultReplicationSlotName(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/internal/testcontainers/test_elasticsearch_container.go b/internal/testcontainers/test_elasticsearch_container.go
index 9fc2270..f1a8be5 100644
--- a/internal/testcontainers/test_elasticsearch_container.go
+++ b/internal/testcontainers/test_elasticsearch_container.go
@@ -10,8 +10,10 @@ import (
 	"github.com/testcontainers/testcontainers-go/modules/elasticsearch"
 )
 
+const elasticsearchImage = "docker.elastic.co/elasticsearch/elasticsearch:8.9.0"
+
 func SetupElasticsearchContainer(ctx context.Context, url *string) (cleanup, error) {
-	ctr, err := elasticsearch.Run(ctx, "docker.elastic.co/elasticsearch/elasticsearch:8.9.0",
+	ctr, err := elasticsearch.Run(ctx, elasticsearchImage,
 		testcontainers.WithEnv(map[string]string{"xpack.security.enabled": "false"})) // disable TLS
 	if err != nil {
 		return nil, fmt.Errorf("failed to start elasticsearch container: %w", err)
diff --git a/internal/testcontainers/test_kafka_container.go b/internal/testcontainers/test_kafka_container.go
index cfc2419..1f1d5ed 100644
--- a/internal/testcontainers/test_kafka_container.go
+++ b/internal/testcontainers/test_kafka_container.go
@@ -12,16 +12,19 @@ import (
 	"github.com/testcontainers/testcontainers-go/wait"
 )
 
+const kafkaImage = "confluentinc/confluent-local:7.5.0"
+
 func SetupKafkaContainer(ctx context.Context, brokers *[]string) (cleanup, error) {
-	ctr, err := kafka.RunContainer(ctx,
+	opts := []testcontainers.ContainerCustomizer{
 		kafka.WithClusterID("test-cluster"),
-		testcontainers.WithImage("confluentinc/confluent-local:7.5.0"),
 		testcontainers.WithWaitStrategy(
 			wait.ForLog("Kafka Server started").
 				WithOccurrence(1).
-				WithStartupTimeout(5*time.Second),
+				WithStartupTimeout(5 * time.Second),
 		),
-	)
+	}
+
+	ctr, err := kafka.Run(ctx, kafkaImage, opts...)
 	if err != nil {
 		return nil, fmt.Errorf("failed to start kafka container: %w", err)
 	}
diff --git a/internal/testcontainers/test_opensearch_container.go b/internal/testcontainers/test_opensearch_container.go
index 5265e2a..36fd803 100644
--- a/internal/testcontainers/test_opensearch_container.go
+++ b/internal/testcontainers/test_opensearch_container.go
@@ -6,14 +6,13 @@ import (
 	"context"
 	"fmt"
 
-	"github.com/testcontainers/testcontainers-go"
 	"github.com/testcontainers/testcontainers-go/modules/opensearch"
 )
 
+const opensearchImage = "opensearchproject/opensearch:2.11.1"
+
 func SetupOpenSearchContainer(ctx context.Context, url *string) (cleanup, error) {
-	ctr, err := opensearch.RunContainer(ctx,
-		testcontainers.WithImage("opensearchproject/opensearch:2.11.1"),
-	)
+	ctr, err := opensearch.Run(ctx, opensearchImage)
 	if err != nil {
 		return nil, fmt.Errorf("failed to start opensearch container: %w", err)
 	}
diff --git a/internal/testcontainers/test_postgres_container.go b/internal/testcontainers/test_postgres_container.go
index d43a8e9..e643016 100644
--- a/internal/testcontainers/test_postgres_container.go
+++ b/internal/testcontainers/test_postgres_container.go
@@ -28,14 +28,13 @@ func SetupPostgresContainer(ctx context.Context, url *string, image PostgresImag
 		WithStartupTimeout(5 * time.Second)
 
 	opts := []testcontainers.ContainerCustomizer{
-		testcontainers.WithImage(string(image)),
 		testcontainers.WithWaitStrategy(waitForLogs),
 	}
-
 	if len(configFile) > 0 {
 		opts = append(opts, postgres.WithConfigFile(configFile[0]))
 	}
-	ctr, err := postgres.RunContainer(ctx, opts...)
+
+	ctr, err := postgres.Run(ctx, string(image), opts...)
 	if err != nil {
 		return nil, fmt.Errorf("failed to start postgres container: %w", err)
 	}
diff --git a/pkg/kafka/kafka_offset_parser_test.go b/pkg/kafka/kafka_offset_parser_test.go
index 5e68c59..c1d2ebb 100644
--- a/pkg/kafka/kafka_offset_parser_test.go
+++ b/pkg/kafka/kafka_offset_parser_test.go
@@ -67,7 +67,6 @@ func TestParser_FromString(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/schemalog/postgres/pg_schemalog_store_test.go b/pkg/schemalog/postgres/pg_schemalog_store_test.go
index f695d74..73a4d57 100644
--- a/pkg/schemalog/postgres/pg_schemalog_store_test.go
+++ b/pkg/schemalog/postgres/pg_schemalog_store_test.go
@@ -82,7 +82,6 @@ func TestStore_FetchLast(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -144,7 +143,6 @@ func TestStore_Fetch(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -206,7 +204,6 @@ func TestStore_Ack(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -328,7 +325,6 @@ func TestStore_Insert(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -361,7 +357,6 @@ func Test_mapError(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.err.Error(), func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/schemalog/schema_diff_test.go b/pkg/schemalog/schema_diff_test.go
index 8a83592..5e4f33a 100644
--- a/pkg/schemalog/schema_diff_test.go
+++ b/pkg/schemalog/schema_diff_test.go
@@ -260,7 +260,6 @@ func Test_ComputeSchemaDiff(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/schemalog/schema_test.go b/pkg/schemalog/schema_test.go
index 3e57ad0..b2e7c0c 100644
--- a/pkg/schemalog/schema_test.go
+++ b/pkg/schemalog/schema_test.go
@@ -56,7 +56,6 @@ func TestTable_GetFirstUniqueNotNullColumn(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/schemalog/store_cache_test.go b/pkg/schemalog/store_cache_test.go
index afc6bef..8a3fcb2 100644
--- a/pkg/schemalog/store_cache_test.go
+++ b/pkg/schemalog/store_cache_test.go
@@ -74,7 +74,6 @@ func TestStoreCache_FetchLast(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -153,7 +152,6 @@ func TestStoreCache_Ack(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -213,7 +211,6 @@ func TestStoreCache_Insert(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/snapshot/generator/postgres/data/helper_test.go b/pkg/snapshot/generator/postgres/data/helper_test.go
index e5e371d..2fdab47 100644
--- a/pkg/snapshot/generator/postgres/data/helper_test.go
+++ b/pkg/snapshot/generator/postgres/data/helper_test.go
@@ -4,15 +4,10 @@ package postgres
 
 import (
 	"context"
-	"fmt"
 	"sync"
 	"testing"
-	"time"
 
 	"github.com/stretchr/testify/require"
-	"github.com/testcontainers/testcontainers-go"
-	"github.com/testcontainers/testcontainers-go/modules/postgres"
-	"github.com/testcontainers/testcontainers-go/wait"
 
 	pglib "github.com/xataio/pgstream/internal/postgres"
 	"github.com/xataio/pgstream/pkg/snapshot"
@@ -32,32 +27,6 @@ func (mp *mockRowProcessor) close() {
 	mp.once.Do(func() { close(mp.rowChan) })
 }
 
-type cleanup func() error
-
-func setupPostgresContainer(ctx context.Context) (cleanup, string, error) {
-	waitForLogs := wait.
-		ForLog("database system is ready to accept connections").
-		WithOccurrence(2).
-		WithStartupTimeout(5 * time.Second)
-
-	ctr, err := postgres.RunContainer(ctx,
-		testcontainers.WithImage("debezium/postgres:14-alpine"),
-		testcontainers.WithWaitStrategy(waitForLogs),
-	)
-	if err != nil {
-		return nil, "", fmt.Errorf("failed to start postgres container: %w", err)
-	}
-
-	pgurl, err := ctr.ConnectionString(ctx, "sslmode=disable")
-	if err != nil {
-		return nil, "", fmt.Errorf("retrieving connection string for postgres container: %w", err)
-	}
-
-	return func() error {
-		return ctr.Terminate(ctx)
-	}, pgurl, nil
-}
-
 func execQuery(t *testing.T, ctx context.Context, pgurl, query string) {
 	conn, err := pglib.NewConn(ctx, pgurl)
 	require.NoError(t, err)
diff --git a/pkg/snapshot/generator/postgres/data/pg_snapshot_generator_integration_test.go b/pkg/snapshot/generator/postgres/data/pg_snapshot_generator_integration_test.go
index a0334c5..ebf7e6c 100644
--- a/pkg/snapshot/generator/postgres/data/pg_snapshot_generator_integration_test.go
+++ b/pkg/snapshot/generator/postgres/data/pg_snapshot_generator_integration_test.go
@@ -9,6 +9,7 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/require"
+	"github.com/xataio/pgstream/internal/testcontainers"
 	"github.com/xataio/pgstream/pkg/snapshot"
 )
 
@@ -20,7 +21,8 @@ func Test_PostgresSnapshotGenerator(t *testing.T) {
 	ctx, cancel := context.WithCancel(context.Background())
 	defer cancel()
 
-	pgCleanup, pgurl, err := setupPostgresContainer(ctx)
+	var pgurl string
+	pgCleanup, err := testcontainers.SetupPostgresContainer(ctx, &pgurl, testcontainers.Postgres14)
 	require.NoError(t, err)
 	defer pgCleanup()
 
diff --git a/pkg/snapshot/generator/postgres/tablefinder/pg_snapshot_table_finder_test.go b/pkg/snapshot/generator/postgres/tablefinder/pg_snapshot_table_finder_test.go
index c158f98..64e73ba 100644
--- a/pkg/snapshot/generator/postgres/tablefinder/pg_snapshot_table_finder_test.go
+++ b/pkg/snapshot/generator/postgres/tablefinder/pg_snapshot_table_finder_test.go
@@ -192,7 +192,6 @@ func TestSnapshotTableFinder_CreateSnapshot(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/snapshot/generator/snapshot_generator_recorder_test.go b/pkg/snapshot/generator/snapshot_generator_recorder_test.go
index 5dd09f4..0c394fd 100644
--- a/pkg/snapshot/generator/snapshot_generator_recorder_test.go
+++ b/pkg/snapshot/generator/snapshot_generator_recorder_test.go
@@ -344,7 +344,6 @@ func TestSnapshotRecorder_CreateSnapshot(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -519,7 +518,6 @@ func TestSnapshotRecorder_filterOutExistingSnapshots(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/snapshot/store/postgres/pg_snapshot_store_test.go b/pkg/snapshot/store/postgres/pg_snapshot_store_test.go
index 188f7bb..bfcc0e3 100644
--- a/pkg/snapshot/store/postgres/pg_snapshot_store_test.go
+++ b/pkg/snapshot/store/postgres/pg_snapshot_store_test.go
@@ -63,7 +63,6 @@ func TestStore_CreateSnapshotRequest(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -148,7 +147,6 @@ func TestStore_UpdateSnapshotRequest(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -274,7 +272,6 @@ func TestStore_GetSnapshotRequestsBySchema(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -398,7 +395,6 @@ func TestStore_GetSnapshotRequestsByStatus(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -508,7 +504,6 @@ func TestStore_createTable(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/stream/integration/config/integration_test_transformer_rules.yaml b/pkg/stream/integration/config/integration_test_transformer_rules.yaml
index 973b8bf..59de557 100644
--- a/pkg/stream/integration/config/integration_test_transformer_rules.yaml
+++ b/pkg/stream/integration/config/integration_test_transformer_rules.yaml
@@ -57,4 +57,4 @@ transformations:
       gender:
         name: greenmask_choice
         parameters:
-          choices: ["M", "F", "None"]
\ No newline at end of file
+          choices: ["M", "F", "None"]
diff --git a/pkg/stream/integration/helper_test.go b/pkg/stream/integration/helper_test.go
index 1a7087e..e3db40a 100644
--- a/pkg/stream/integration/helper_test.go
+++ b/pkg/stream/integration/helper_test.go
@@ -78,7 +78,7 @@ func newMockWebhookServer() *mockWebhookServer {
 
 func (m *mockWebhookServer) close() {
 	close(m.dataChan)
-	m.Server.Close()
+	m.Close()
 }
 
 func runStream(t *testing.T, ctx context.Context, cfg *stream.Config) {
diff --git a/pkg/stream/integration/pg_kafka_integration_test.go b/pkg/stream/integration/pg_kafka_integration_test.go
index 3e8a9a7..910ea1c 100644
--- a/pkg/stream/integration/pg_kafka_integration_test.go
+++ b/pkg/stream/integration/pg_kafka_integration_test.go
@@ -75,7 +75,6 @@ func Test_PostgresToKafka(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			execQuery(t, ctx, tc.query)
 
diff --git a/pkg/stream/integration/pg_pg_integration_test.go b/pkg/stream/integration/pg_pg_integration_test.go
index c20062b..a439ead 100644
--- a/pkg/stream/integration/pg_pg_integration_test.go
+++ b/pkg/stream/integration/pg_pg_integration_test.go
@@ -193,7 +193,6 @@ func Test_PostgresToPostgres(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			execQuery(t, ctx, tc.query)
 
diff --git a/pkg/stream/integration/pg_search_integration_test.go b/pkg/stream/integration/pg_search_integration_test.go
index 3900fb5..6ef1bfb 100644
--- a/pkg/stream/integration/pg_search_integration_test.go
+++ b/pkg/stream/integration/pg_search_integration_test.go
@@ -93,7 +93,6 @@ func Test_PostgresToSearch(t *testing.T) {
 		}
 
 		for _, tc := range tests {
-			tc := tc
 			t.Run(tc.name, func(t *testing.T) {
 				execQuery(t, ctx, tc.query)
 
diff --git a/pkg/stream/integration/pg_webhook_integration_test.go b/pkg/stream/integration/pg_webhook_integration_test.go
index 254f1f1..1ac5f23 100644
--- a/pkg/stream/integration/pg_webhook_integration_test.go
+++ b/pkg/stream/integration/pg_webhook_integration_test.go
@@ -70,7 +70,6 @@ func Test_PostgresToWebhook(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			execQuery(t, ctx, tc.query)
 
diff --git a/pkg/tls/tls_test.go b/pkg/tls/tls_test.go
index 53e79aa..0ec443d 100644
--- a/pkg/tls/tls_test.go
+++ b/pkg/tls/tls_test.go
@@ -152,7 +152,6 @@ func Test_NewConfig(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -196,7 +195,6 @@ func Test_readPEMBytes(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/checkpointer/kafka/wal_kafka_checkpointer_test.go b/pkg/wal/checkpointer/kafka/wal_kafka_checkpointer_test.go
index f216349..5339795 100644
--- a/pkg/wal/checkpointer/kafka/wal_kafka_checkpointer_test.go
+++ b/pkg/wal/checkpointer/kafka/wal_kafka_checkpointer_test.go
@@ -124,7 +124,6 @@ func TestCheckpointer_CommitOffsets(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/checkpointer/postgres/wal_pg_checkpointer_test.go b/pkg/wal/checkpointer/postgres/wal_pg_checkpointer_test.go
index a3ce510..0f6d5e9 100644
--- a/pkg/wal/checkpointer/postgres/wal_pg_checkpointer_test.go
+++ b/pkg/wal/checkpointer/postgres/wal_pg_checkpointer_test.go
@@ -95,7 +95,6 @@ func TestCheckpointer_SyncLSN(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/listener/kafka/wal_kafka_reader_test.go b/pkg/wal/listener/kafka/wal_kafka_reader_test.go
index 954d602..396b7bd 100644
--- a/pkg/wal/listener/kafka/wal_kafka_reader_test.go
+++ b/pkg/wal/listener/kafka/wal_kafka_reader_test.go
@@ -146,7 +146,6 @@ func TestReader_Listen(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/listener/postgres/wal_pg_listener_test.go b/pkg/wal/listener/postgres/wal_pg_listener_test.go
index 21e27cf..b774a79 100644
--- a/pkg/wal/listener/postgres/wal_pg_listener_test.go
+++ b/pkg/wal/listener/postgres/wal_pg_listener_test.go
@@ -334,7 +334,6 @@ func TestListener_Listen(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/listener/snapshot/adapter/config_test.go b/pkg/wal/listener/snapshot/adapter/config_test.go
index 00d4aa6..8e06c0b 100644
--- a/pkg/wal/listener/snapshot/adapter/config_test.go
+++ b/pkg/wal/listener/snapshot/adapter/config_test.go
@@ -28,7 +28,6 @@ func TestSnapshotConfig_schemaTableMap(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/listener/snapshot/adapter/wal_process_event_adapter_test.go b/pkg/wal/listener/snapshot/adapter/wal_process_event_adapter_test.go
index b69369b..8304c85 100644
--- a/pkg/wal/listener/snapshot/adapter/wal_process_event_adapter_test.go
+++ b/pkg/wal/listener/snapshot/adapter/wal_process_event_adapter_test.go
@@ -61,7 +61,6 @@ func TestProcessEventAdapter_snapshotRowToWalEvent(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/processor/batch/wal_batch_sender_test.go b/pkg/wal/processor/batch/wal_batch_sender_test.go
index b6701e3..9aa34c0 100644
--- a/pkg/wal/processor/batch/wal_batch_sender_test.go
+++ b/pkg/wal/processor/batch/wal_batch_sender_test.go
@@ -114,7 +114,6 @@ func TestSender_AddToBatch(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -262,7 +261,6 @@ func TestSender_Send(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/processor/injector/wal_injector_test.go b/pkg/wal/processor/injector/wal_injector_test.go
index be3df35..9ace417 100644
--- a/pkg/wal/processor/injector/wal_injector_test.go
+++ b/pkg/wal/processor/injector/wal_injector_test.go
@@ -179,7 +179,6 @@ func TestInjector_ProcessWALEvent(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -421,7 +420,6 @@ func TestInjector_inject(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -520,7 +518,6 @@ func Test_primaryKeyFinder(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/processor/kafka/wal_kafka_batch_writer_test.go b/pkg/wal/processor/kafka/wal_kafka_batch_writer_test.go
index 55f1613..dce8e62 100644
--- a/pkg/wal/processor/kafka/wal_kafka_batch_writer_test.go
+++ b/pkg/wal/processor/kafka/wal_kafka_batch_writer_test.go
@@ -163,7 +163,6 @@ func TestBatchKafkaWriter_ProcessWALEvent(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -281,7 +280,6 @@ func TestBatchKafkaWriter_sendBatch(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/processor/search/search_adapter_test.go b/pkg/wal/processor/search/search_adapter_test.go
index c3cb6f6..eac19d7 100644
--- a/pkg/wal/processor/search/search_adapter_test.go
+++ b/pkg/wal/processor/search/search_adapter_test.go
@@ -143,7 +143,6 @@ func TestAdapter_walEventToMsg(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 			a := newAdapter(noopMapper, testLSNParser)
@@ -220,7 +219,6 @@ func TestAdapter_walDataToLogEntry(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -406,7 +404,6 @@ func TestAdapter_walDataToDocument(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -599,7 +596,6 @@ func TestAdapter_parseColumns(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -728,7 +724,6 @@ func TestAdapter_parseIDColumns(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -786,7 +781,6 @@ func TestAdapter_parseVersionColumn(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/processor/search/search_store_retrier_test.go b/pkg/wal/processor/search/search_store_retrier_test.go
index c371bf0..5e626d2 100644
--- a/pkg/wal/processor/search/search_store_retrier_test.go
+++ b/pkg/wal/processor/search/search_store_retrier_test.go
@@ -83,7 +83,6 @@ func TestStoreRetrier_DeleteSchema(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -222,7 +221,6 @@ func TestStoreRetrier_SendDocuments(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/processor/search/store/search_pg_mapper_test.go b/pkg/wal/processor/search/store/search_pg_mapper_test.go
index 1c13294..5a10e47 100644
--- a/pkg/wal/processor/search/store/search_pg_mapper_test.go
+++ b/pkg/wal/processor/search/store/search_pg_mapper_test.go
@@ -278,7 +278,6 @@ func TestMapper_MapColumnValue(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/processor/search/store/search_store_test.go b/pkg/wal/processor/search/store/search_store_test.go
index 9d6a8a5..ebbb3b3 100644
--- a/pkg/wal/processor/search/store/search_store_test.go
+++ b/pkg/wal/processor/search/store/search_store_test.go
@@ -209,7 +209,6 @@ func TestStore_ApplySchemaChange(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -305,7 +304,6 @@ func TestStore_SendDocuments(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -450,7 +448,6 @@ func TestStore_DeleteSchema(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -538,7 +535,6 @@ func TestStore_DeleteTableDocuments(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -741,7 +737,6 @@ func TestStore_getLastSchemaLogEntry(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -825,7 +820,6 @@ func TestStore_createSchema(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -1028,7 +1022,6 @@ func TestStore_updateMapping(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/processor/wal_processor_test.go b/pkg/wal/processor/wal_processor_test.go
index ce0eb85..76d03e9 100644
--- a/pkg/wal/processor/wal_processor_test.go
+++ b/pkg/wal/processor/wal_processor_test.go
@@ -65,7 +65,6 @@ func Test_WalDataToLogEntry(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/processor/webhook/notifier/webhook_notifier_test.go b/pkg/wal/processor/webhook/notifier/webhook_notifier_test.go
index cb80790..234a3c5 100644
--- a/pkg/wal/processor/webhook/notifier/webhook_notifier_test.go
+++ b/pkg/wal/processor/webhook/notifier/webhook_notifier_test.go
@@ -153,7 +153,6 @@ func TestNotifier_ProcessWALEvent(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -293,7 +292,6 @@ func TestNotifier_Notify(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/processor/webhook/subscription/server/subscription_server_test.go b/pkg/wal/processor/webhook/subscription/server/subscription_server_test.go
index 691319b..6d78632 100644
--- a/pkg/wal/processor/webhook/subscription/server/subscription_server_test.go
+++ b/pkg/wal/processor/webhook/subscription/server/subscription_server_test.go
@@ -90,7 +90,6 @@ func TestSubscriptionServer_subscribe(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -180,7 +179,6 @@ func TestSubscriptionServer_unsubscribe(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/processor/webhook/subscription/store/cache/subscription_store_cache_test.go b/pkg/wal/processor/webhook/subscription/store/cache/subscription_store_cache_test.go
index d84307c..459e32b 100644
--- a/pkg/wal/processor/webhook/subscription/store/cache/subscription_store_cache_test.go
+++ b/pkg/wal/processor/webhook/subscription/store/cache/subscription_store_cache_test.go
@@ -52,7 +52,6 @@ func TestSubscriptionStoreCache_NewSubscriptionStoreCache(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -95,7 +94,6 @@ func TestSubscriptionStoreCache_GetSubscriptions(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/processor/webhook/subscription/store/postgres/pg_subscription_store_test.go b/pkg/wal/processor/webhook/subscription/store/postgres/pg_subscription_store_test.go
index 63bf1d9..3d7ef0d 100644
--- a/pkg/wal/processor/webhook/subscription/store/postgres/pg_subscription_store_test.go
+++ b/pkg/wal/processor/webhook/subscription/store/postgres/pg_subscription_store_test.go
@@ -58,7 +58,6 @@ func TestStore_buildGetQuery(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/processor/webhook/subscription/subscription_test.go b/pkg/wal/processor/webhook/subscription/subscription_test.go
index dd1336b..1aa85a9 100644
--- a/pkg/wal/processor/webhook/subscription/subscription_test.go
+++ b/pkg/wal/processor/webhook/subscription/subscription_test.go
@@ -65,7 +65,6 @@ func TestSubscription_IsFor(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
diff --git a/pkg/wal/replication/postgres/pg_replication_handler_test.go b/pkg/wal/replication/postgres/pg_replication_handler_test.go
index 5e4ed67..2b6ab9b 100644
--- a/pkg/wal/replication/postgres/pg_replication_handler_test.go
+++ b/pkg/wal/replication/postgres/pg_replication_handler_test.go
@@ -258,7 +258,6 @@ func TestHandler_StartReplication(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -334,7 +333,6 @@ func TestHandler_ReceiveMessage(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -409,7 +407,6 @@ func TestHandler_GetReplicationLag(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()
 
@@ -484,7 +481,6 @@ func TestHandler_GetCurrentLSN(t *testing.T) {
 	}
 
 	for _, tc := range tests {
-		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()