ax(mining): replace prose comment with usage example on isValidAlgo

AX Principle 2: comments must show HOW with real values, not restate what
the type signature already says. "checks if an algorithm name contains only
valid characters" is a prose description — replaced with concrete call examples.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 13:06:48 +01:00
parent 5b0b0d638e
commit 8247d62ab3
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -221,7 +221,8 @@ func containsShellChars(s string) bool {
return false
}
// isValidAlgo checks if an algorithm name contains only valid characters
// isValidAlgo("rx/0") == true
// isValidAlgo("rx/0;rm -rf /") == false
func isValidAlgo(algo string) bool {
for _, r := range algo {
if !((r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') || (r >= '0' && r <= '9') || r == '-' || r == '/' || r == '_') {