Skip to content

Commit dc237c3

Browse files
authored
chore: remove unnecessary useless comments (#219)
1 parent b16ef0d commit dc237c3

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

tools/alerting_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (c *alertingClient) makeRequest(ctx context.Context, path string) (*http.Re
8282
}
8383
if resp.StatusCode != http.StatusOK {
8484
bodyBytes, _ := io.ReadAll(resp.Body)
85-
_ = resp.Body.Close() //nolint:errcheck // Ignore close error in error handling path
85+
_ = resp.Body.Close() //nolint:errcheck
8686
return nil, fmt.Errorf("grafana API returned status code %d: %s", resp.StatusCode, string(bodyBytes))
8787
}
8888

@@ -95,7 +95,7 @@ func (c *alertingClient) GetRules(ctx context.Context) (*rulesResponse, error) {
9595
return nil, fmt.Errorf("failed to get alert rules from Grafana API: %w", err)
9696
}
9797
defer func() {
98-
_ = resp.Body.Close() //nolint:errcheck // Ignore close error in defer
98+
_ = resp.Body.Close() //nolint:errcheck
9999
}()
100100

101101
var rulesResponse rulesResponse

tools/asserts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func (c *Client) fetchAssertsData(ctx context.Context, urlPath string, method st
9191
return "", fmt.Errorf("failed to execute request: %w", err)
9292
}
9393
defer func() {
94-
_ = resp.Body.Close() //nolint:errcheck // Ignore close error in defer
94+
_ = resp.Body.Close() //nolint:errcheck
9595
}()
9696

9797
body, err := io.ReadAll(resp.Body)

tools/loki.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (c *Client) makeRequest(ctx context.Context, method, urlPath string, params
114114
return nil, fmt.Errorf("executing request: %w", err)
115115
}
116116
defer func() {
117-
_ = resp.Body.Close() //nolint:errcheck // Ignore close error in defer
117+
_ = resp.Body.Close() //nolint:errcheck
118118
}()
119119

120120
// Check for non-200 status code

tools/oncall.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func getOnCallURLFromSettings(ctx context.Context, grafanaURL, grafanaAPIKey str
3434
return "", fmt.Errorf("fetching settings: %w", err)
3535
}
3636
defer func() {
37-
_ = resp.Body.Close() //nolint:errcheck // Ignore close error in defer
37+
_ = resp.Body.Close() //nolint:errcheck
3838
}()
3939

4040
if resp.StatusCode != http.StatusOK {

tools/pyroscope.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ func (c *pyroscopeClient) get(ctx context.Context, path string, params url.Value
371371
return nil, fmt.Errorf("failed to send request: %w", err)
372372
}
373373
defer func() {
374-
_ = res.Body.Close() //nolint:errcheck // Ignore close error in defer
374+
_ = res.Body.Close() //nolint:errcheck
375375
}()
376376

377377
if res.StatusCode < 200 || res.StatusCode > 299 {

tools/sift.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ func (c *siftClient) makeRequest(ctx context.Context, method, path string, body
450450
return nil, fmt.Errorf("executing request: %w", err)
451451
}
452452
defer func() {
453-
_ = response.Body.Close() //nolint:errcheck // Ignore close error in defer
453+
_ = response.Body.Close() //nolint:errcheck
454454
}()
455455

456456
// Check for non-200 status code (matching Loki client's logic)

0 commit comments

Comments
 (0)