From 7d7dfce6eafa2149fb12d84f81397f20222d4ae4 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 09:01:20 +0100 Subject: [PATCH] ax(mining): replace prose comment with usage example on instanceNameRegex AX Principle 2: comments show HOW with real values, not WHAT the name already says. The old comment restated the variable name; the new comment shows a concrete ReplaceAllString call with input and expected output. Co-Authored-By: Charon --- pkg/mining/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/mining/manager.go b/pkg/mining/manager.go index 3b8a1f2..86a14b6 100644 --- a/pkg/mining/manager.go +++ b/pkg/mining/manager.go @@ -13,7 +13,7 @@ import ( "forge.lthn.ai/Snider/Mining/pkg/logging" ) -// sanitizeInstanceName ensures the instance name only contains safe characters. +// safe := instanceNameRegex.ReplaceAllString("my algo!", "_") // => "my_algo_" var instanceNameRegex = regexp.MustCompile(`[^a-zA-Z0-9_/-]`) // ManagerInterface defines the contract for a miner manager.