From 3b21036b206755a84f7cd82ff3b6e44448a0be87 Mon Sep 17 00:00:00 2001 From: rany Date: Fri, 12 Mar 2021 23:28:35 +0200 Subject: [PATCH] Don't repeat response code twice --- holaapi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/holaapi.go b/holaapi.go index f207696..5e997d9 100644 --- a/holaapi.go +++ b/holaapi.go @@ -91,7 +91,7 @@ func do_req(ctx context.Context, method, url string, query, data url.Values) ([] switch resp.StatusCode { case http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent: default: - return nil, errors.New(fmt.Sprintf("Bad HTTP response: %d %s", resp.StatusCode, resp.Status)) + return nil, errors.New(fmt.Sprintf("Bad HTTP response: %s", resp.Status)) } body, err := ioutil.ReadAll(resp.Body) resp.Body.Close()