From 78e3d95069dab5d9058c1670e323410989134abb Mon Sep 17 00:00:00 2001 From: Himadri Bhattacharjee Date: Thu, 13 Jul 2023 19:40:06 +0530 Subject: [PATCH] refactor: break instead of using goto --- pkg/httpclient/client.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/httpclient/client.go b/pkg/httpclient/client.go index 11bbf26..944c613 100644 --- a/pkg/httpclient/client.go +++ b/pkg/httpclient/client.go @@ -36,10 +36,9 @@ func MakeRequest(c *fasthttp.Client, url string, maxRetries uint, timeout uint, req.SetRequestURI(url) respBody, err = doReq(c, req, timeout) if err == nil { - goto done + break } } -done: if err != nil { return nil, err }