From 857c5f0ae3ebbcef5b35321f892116e0c7cdaea6 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 07:33:01 +0100 Subject: [PATCH] ax(node): rename idx to separatorIndex in parseComment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- pkg/node/lethean.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/node/lethean.go b/pkg/node/lethean.go index fc24ca0..c3404b3 100644 --- a/pkg/node/lethean.go +++ b/pkg/node/lethean.go @@ -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