From 8bfb425fdacacfcadc77a9ea6058017f037a303a Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 16:25:43 +0100 Subject: [PATCH] ax(mining): replace prose comment with usage example on isRetryableError MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AX principle 2: comments show HOW with real values, not WHAT the function does — the signature already says that. Co-Authored-By: Charon --- pkg/mining/service.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/mining/service.go b/pkg/mining/service.go index 1c5c65f..f0647a9 100644 --- a/pkg/mining/service.go +++ b/pkg/mining/service.go @@ -125,7 +125,8 @@ func respondWithMiningError(c *gin.Context, err *MiningError) { c.JSON(err.StatusCode(), apiErr) } -// isRetryableError determines if an error status code is retryable +// isRetryableError(http.StatusServiceUnavailable) // => true +// isRetryableError(http.StatusNotFound) // => false func isRetryableError(status int) bool { return status == http.StatusServiceUnavailable || status == http.StatusTooManyRequests ||