mirror of
https://github.com/tiennm99/loldle.git
synced 2026-10-14 00:16:46 +00:00
feat: sort champions alphabetically by name
This commit is contained in:
1 parent
1e7a05e591
commit
234d557bcc
2 files changed
+2648
-2643
No files matched your search
+2643
-2643
File diff suppressed because it is too large.
Load diff
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user