From e2138179e38e4bbe97b3497cb2c6b5feeb44b36d Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Wed, 22 Jun 2016 12:01:24 -0700 Subject: [PATCH] client: fix from go vet, go lint --- client/keys_test.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/client/keys_test.go b/client/keys_test.go index 18d1282f3..4be0ede78 100644 --- a/client/keys_test.go +++ b/client/keys_test.go @@ -645,15 +645,14 @@ func assertRequest(got http.Request, wantMethod string, wantURL *url.URL, wantHe } else { if wantBody == nil { return fmt.Errorf("want.Body=%v got.Body=%s", wantBody, got.Body) - } else { - gotBytes, err := ioutil.ReadAll(got.Body) - if err != nil { - return err - } + } + gotBytes, err := ioutil.ReadAll(got.Body) + if err != nil { + return err + } - if !reflect.DeepEqual(wantBody, gotBytes) { - return fmt.Errorf("want.Body=%s got.Body=%s", wantBody, gotBytes) - } + if !reflect.DeepEqual(wantBody, gotBytes) { + return fmt.Errorf("want.Body=%s got.Body=%s", wantBody, gotBytes) } }