From f39d449ca257f3b1b1b8b67c62603f2369bbfaa7 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 5 Jul 2021 16:10:38 +0300 Subject: [PATCH] lint Signed-off-by: Vasiliy Tolstov --- http.go | 4 ++-- util.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/http.go b/http.go index ff9226e..d4250d2 100644 --- a/http.go +++ b/http.go @@ -32,10 +32,10 @@ func filterLabel(r []router.Route) []router.Route { */ type httpClient struct { - opts client.Options httpcli *http.Client - init bool + opts client.Options sync.RWMutex + init bool } func newRequest(addr string, req client.Request, ct string, cf codec.Codec, msg interface{}, opts client.CallOptions) (*http.Request, error) { diff --git a/util.go b/util.go index 283bd43..fb3c614 100644 --- a/util.go +++ b/util.go @@ -240,7 +240,7 @@ func (h *httpClient) parseRsp(ctx context.Context, hrsp *http.Response, rsp inte } if cerr := cf.ReadBody(hrsp.Body, rerr); cerr != nil { - err = errors.InternalServerError("go.micro.client", cerr.Error()) + return errors.InternalServerError("go.micro.client", cerr.Error()) } if err, ok = rerr.(error); !ok {