Files
loldle/data/parser/helpers.go
T
tiennm99 cfa664f217 feat: rewrite LoLdleData in Go
4-stage pipeline: fetch ddragon champions, enrich with release dates
(wiki scrape), regions (Universe API), and lanes (wiki scrape).
Concurrent gender detection via goroutines with semaphore.
2026-04-04 18:06:48 +07:00

11 lines
276 B
Go

package parser
// buildNameIndex creates a map from champion name to slice index for O(1) lookups.
func buildNameIndex(champions []ChampionResult) map[string]int {
idx := make(map[string]int, len(champions))
for i, c := range champions {
idx[c.Name] = i
}
return idx
}