ax(node): rename idx to separatorIndex in parseComment
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

AX Principle 1 — predictable names over short names. idx is an
abbreviation requiring a mental mapping; separatorIndex names the
variable by its role (the index of the = separator character).

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 07:33:01 +01:00
parent 38b22f96a0
commit 857c5f0ae3
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -144,9 +144,9 @@ func DiscoverGateways(daemonURL string) []PoolGateway {
func parseComment(comment string) map[string]string {
result := make(map[string]string)
for _, part := range strings.Split(comment, ";") {
idx := strings.IndexByte(part, '=')
if idx > 0 {
result[part[:idx]] = part[idx+1:]
separatorIndex := strings.IndexByte(part, '=')
if separatorIndex > 0 {
result[part[:separatorIndex]] = part[separatorIndex+1:]
}
}
return result