feat: sort champions alphabetically by name

This commit is contained in:
tiennm99 committed 2026-04-04 18:58:36 +07:00
1 parent 1e7a05e591
commit 234d557bcc
2 files changed
+2648 -2643

No files matched your search

+2643 -2643
View File
File diff suppressed because it is too large. Load diff
+5
View File
@@ -5,6 +5,7 @@ import (
"fmt"
"log"
"os"
"sort"
"github.com/tiennm99/loldle-data/parser"
)
@@ -30,6 +31,10 @@ func main() {
log.Fatalf("Failed to enrich lanes: %v", err)
}
sort.Slice(champions, func(i, j int) bool {
return champions[i].Name < champions[j].Name
})
outputPath := "champions.json"
if err := saveJSON(outputPath, champions); err != nil {
log.Fatalf("Failed to save JSON: %v", err)