Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tmck-code committed Apr 4, 2024
1 parent 9e2ca93 commit cb4f26c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pokesay.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,13 @@ func runPrintByName(args pokesay.Args) {
// - Finally, it prints the pokemon
func runPrintByID(args pokesay.Args) {
t := timer.NewTimer("runPrintByName", true)
names := pokedex.ReadStructFromBytes[map[string][]int](GOBAllNames)
sorted := pokesay.ListNames(names)
t.Mark("read name struct")

idxs := strings.Split(args.IDToken, ".")

idx, _ := strconv.Atoi(idxs[0])
subIdx, _ := strconv.Atoi(idxs[1])

t.Mark("find name via ID")
t.Mark("format IDs")

metadata, final, err := pokesay.ChooseByIndex(idx, subIdx, GOBCowNames, MetadataRoot)
if err != nil {
Expand Down

0 comments on commit cb4f26c

Please sign in to comment.