Improve readability with backtics (#1830)

This commit is contained in:
Victor Agababov 2020-10-21 13:08:32 -07:00 committed by GitHub
parent 8699a365d0
commit f492d0877a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -98,12 +98,12 @@ func TestLinkToBucketAndObject(t *testing.T) {
{
name: "Invalid gcsUrl - No slash",
arg: "knative-prow-no-object",
err: errors.New("the gsUrl (\"knative-prow-no-object\") cannot be converted to bucket/object"),
err: errors.New(`the gsUrl ("knative-prow-no-object") cannot be converted to bucket/object`),
},
{
name: "Invalid gcsUrl - No object",
arg: "knative-prow/",
err: errors.New("the gsUrl (\"knative-prow/\") cannot be converted to bucket/object"),
err: errors.New(`the gsUrl ("knative-prow/") cannot be converted to bucket/object`),
},
}
for _, tt := range tests {

View File

@ -30,7 +30,7 @@ func (a assertions) textContains(haystack string, needles texts) {
for _, needle := range needles.elms {
if !strings.Contains(haystack, needle) {
a.t.Errorf(
"expected \"%s\" is not in: `%s`",
"expected %q is not in: %q",
needle, haystack,
)
}

View File

@ -28,7 +28,7 @@ import (
var (
fakeHost = "fakehost"
fakeRes = "{\"name\": \"res\", \"type\": \"t\", \"state\": \"d\"}"
fakeRes = `{"name": "res", "type": "t", "state": "d"}`
)
// create a fake server as Boskos server, must close() afterwards