Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuang-Minh Nguyen <qmnguyen@gitlab.com>2023-03-14 13:40:15 +0300
committerQuang-Minh Nguyen <qmnguyen@gitlab.com>2023-03-16 05:50:46 +0300
commit936640076881092ad60202823f2dc81828aa4b6d (patch)
treeaa79a72dd5362f5185f5b55e8265d7106a9625a6 /internal/praefect/datastore/listener_test.go
parent5c42c9509ff0fab716f7b903b9dc4be77f1c15d9 (diff)
lint: Fix manual quote interpolation offenses
This commit fixes manually quoted string interpolation with '%s' and "%s". Quoting this way doesn't escape special characters such as endline and makes debugging harder later. We encourage to use %q verb instead.
Diffstat (limited to 'internal/praefect/datastore/listener_test.go')
-rw-r--r--internal/praefect/datastore/listener_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/praefect/datastore/listener_test.go b/internal/praefect/datastore/listener_test.go
index 38db2a1a4..dae8c52ab 100644
--- a/internal/praefect/datastore/listener_test.go
+++ b/internal/praefect/datastore/listener_test.go
@@ -51,6 +51,7 @@ func TestListener_Listen(t *testing.T) {
notifyListener := func(t *testing.T, channels []string, payload string) {
t.Helper()
for _, channel := range channels {
+ //nolint:gitaly-linters
_, err := db.Exec(fmt.Sprintf(`NOTIFY %s, '%s'`, channel, payload))
assert.NoError(t, err)
}