style: fix linter nits

This commit is contained in:
2026-06-13 21:31:42 +02:00
parent ea411e5feb
commit 7523215a71
2 changed files with 5 additions and 5 deletions

View File

@@ -53,12 +53,12 @@ func Post[T any](ctx context.Context, httpClient *http.Client, url string, query
}
defer func() { _ = resp.Body.Close() }()
max := opts.BodyMax
if max <= 0 {
max = 2 << 20
bodyMax := opts.BodyMax
if bodyMax <= 0 {
bodyMax = 2 << 20
}
respBody, err := io.ReadAll(io.LimitReader(resp.Body, max))
respBody, err := io.ReadAll(io.LimitReader(resp.Body, bodyMax))
if err != nil {
return zero, fmt.Errorf("graphql: read response: %w", err)
}