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 <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 09:01:20 +01:00
parent 5610491832
commit 7d7dfce6ea
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -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.