From 12e1e986157ec46fb273824565d9937bd4235105 Mon Sep 17 00:00:00 2001 From: Sean Rees Date: Mon, 18 Jul 2016 19:05:36 +0100 Subject: [PATCH] google: fix warnings from go vet go vet reports the following warnings: google/jwt_test.go:85: missing argument for Fatalf("%q"): format reads arg 2, have only 1 args google/sdk_test.go:28: wrong number of args for format in Errorf call: 1 needed but 2 args Change-Id: If5acfae42b558ced7694dd7bc6f12ab4a3cb6115 Reviewed-on: https://go-review.googlesource.com/24992 Reviewed-by: Jaana Burcu Dogan --- google/jwt_test.go | 2 +- google/sdk_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/google/jwt_test.go b/google/jwt_test.go index 7f9a2f8..f844436 100644 --- a/google/jwt_test.go +++ b/google/jwt_test.go @@ -82,7 +82,7 @@ func TestJWTAccessTokenSourceFromJSON(t *testing.T) { } var hdr jws.Header if err := json.Unmarshal([]byte(hdrJSON), &hdr); err != nil { - t.Fatalf("json.Unmarshal: %v (%q)", err) + t.Fatalf("json.Unmarshal: %v (%q)", err, hdrJSON) } if got, want := hdr.KeyID, "268f54e43a1af97cfc71731688434f45aca15c8b"; got != want { diff --git a/google/sdk_test.go b/google/sdk_test.go index a5aa2a6..4489bb9 100644 --- a/google/sdk_test.go +++ b/google/sdk_test.go @@ -25,9 +25,9 @@ func TestSDKConfig(t *testing.T) { c, err := NewSDKConfig(tt.account) if got, want := err != nil, tt.err; got != want { if !tt.err { - t.Errorf("expected no error, got error: %v", tt.err, err) + t.Errorf("got %v, want nil", err) } else { - t.Errorf("expected error, got none") + t.Errorf("got nil, want error") } continue } @@ -36,11 +36,11 @@ func TestSDKConfig(t *testing.T) { } tok := c.initialToken if tok == nil { - t.Errorf("expected token %q, got: nil", tt.accessToken) + t.Errorf("got nil, want %q", tt.accessToken) continue } if tok.AccessToken != tt.accessToken { - t.Errorf("expected token %q, got: %q", tt.accessToken, tok.AccessToken) + t.Errorf("got %q, want %q", tok.AccessToken, tt.accessToken) } } }