Fix all errcheck linter issues

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
2026-03-15 10:36:35 -07:00
parent 87b7323367
commit d0b1875dbb
13 changed files with 71 additions and 71 deletions

View File

@@ -23,7 +23,7 @@ func (h *Handler) validateChallenge(ctx context.Context, chall *Challenge, accou
h.logger.Error("acme: load authz for validation", "id", chall.AuthzID, "error", err)
chall.Status = StatusInvalid
chall.Error = &ProblemDetail{Type: ProblemServerInternal, Detail: "failed to load authorization"}
h.saveChallenge(ctx, chall)
_ = h.saveChallenge(ctx, chall)
return
}
// Inject the identifier value into the context for validators.
@@ -202,7 +202,7 @@ func validateHTTP01(ctx context.Context, chall *Challenge, accountJWK []byte) er
if err != nil {
return fmt.Errorf("HTTP-01 fetch failed: %w", err)
}
defer resp.Body.Close()
defer func() { _ = resp.Body.Close() }()
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("HTTP-01: unexpected status %d", resp.StatusCode)