mirror of
https://github.com/tiennm99/loldle.git
synced 2026-08-31 16:26:33 +00:00
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.
11 lines
276 B
Go
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
|
|
}
|