Use %q for quoted strings where appropriate (#15216)

* change '%s' to %q where single vs double quotes shouldn't matter

* replace double quotes with %q in logs and errors
This commit is contained in:
swayne275
2022-08-03 12:32:45 -06:00
committed by GitHub
parent c36379cfec
commit 82f1216c83
32 changed files with 70 additions and 70 deletions

View File

@@ -106,7 +106,7 @@ func TestPostgreSQLBackendMaxIdleConnectionsParameter(t *testing.T) {
}
expectedErrStr := "failed parsing max_idle_connections parameter: strconv.Atoi: parsing \"bad param\": invalid syntax"
if err.Error() != expectedErrStr {
t.Errorf("Expected: \"%s\" but found \"%s\"", expectedErrStr, err.Error())
t.Errorf("Expected: %q but found %q", expectedErrStr, err.Error())
}
}
@@ -165,7 +165,7 @@ func TestConnectionURL(t *testing.T) {
got := connectionURL(tt.input.conf)
if got != tt.want {
t.Errorf("connectionURL(%s): want '%s', got '%s'", tt.input, tt.want, got)
t.Errorf("connectionURL(%s): want %q, got %q", tt.input, tt.want, got)
}
})
}