pokedex_cli/command_pokedex.go

17 lines
299 B
Go

package main
import "fmt"
func commandPokedex(p *PokedexConfig, a *string) error {
if len(p.CaughtPokemon) == 0 {
fmt.Println("Your Pokedex is empty.")
return nil
}
fmt.Println("Your Pokedex:")
for _, pokemon := range p.CaughtPokemon {
fmt.Println(" - ", pokemon.Name)
}
return nil
}