Skip to content

Commit

Permalink
print the ids
Browse files Browse the repository at this point in the history
  • Loading branch information
tmck-code committed Apr 4, 2024
1 parent a79e577 commit 358fec0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pokesay.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ func runListNames() {
names := pokesay.ListNames(
pokedex.ReadStructFromBytes[map[string][]int](GOBAllNames),
)
fmt.Printf("%s\n%d %s\n", strings.Join(names, " "), len(names), "total names")
s := make([]string, 0)
for i, name := range names {
s = append(s, fmt.Sprintf("%d:%s", i, name))
}
fmt.Println(strings.Join(s, ", "))
// fmt.Printf("%s\n%d %s\n", strings.Join(names, " "), len(names), "total names")
}

// GenerateNames returns a list of names to print
Expand Down

0 comments on commit 358fec0

Please sign in to comment.