Skip to content

Commit d589c2f

Browse files
Rename url parameter in Postman client to urlString (#4184)
This prevents masking the library named url, as well as makes more explicit what is actually being carried in the variable
1 parent 7029746 commit d589c2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/sources/postman/postman_client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ func checkResponseStatus(r *http.Response) error {
254254
}
255255

256256
// getPostmanResponseBodyBytes makes a request to the Postman API and returns the response body as bytes.
257-
func (c *Client) getPostmanResponseBodyBytes(ctx context.Context, url string, headers map[string]string) ([]byte, error) {
258-
req, err := c.NewRequest(url, headers)
257+
func (c *Client) getPostmanResponseBodyBytes(ctx context.Context, urlString string, headers map[string]string) ([]byte, error) {
258+
req, err := c.NewRequest(urlString, headers)
259259
if err != nil {
260260
return nil, err
261261
}
@@ -266,7 +266,7 @@ func (c *Client) getPostmanResponseBodyBytes(ctx context.Context, url string, he
266266
}
267267
defer resp.Body.Close()
268268

269-
c.Metrics.apiRequests.WithLabelValues(url).Inc()
269+
c.Metrics.apiRequests.WithLabelValues(urlString).Inc()
270270

271271
rateLimitRemainingMonthValue := resp.Header.Get("RateLimit-Remaining-Month")
272272
if rateLimitRemainingMonthValue == "" {

0 commit comments

Comments
 (0)