This is a commandline Pokedex, written in Go.
This project uses the standard library and has no external dependencies.
To build the application:
go build
To run the built application and have the time of your life:
./pokedex
or, you can cheat and do both at the same time with:
go run .
If you'd like a permanent Pokedex on your system (idk, maybe you really like Pokemon?), run the install command inside the source directory
go install
help
- Display the help screen and command listexit
- Quitmap
- List the next 20 map locationsmapb
- List the previous 20 map locationsexplore <location>
- Display details about the selected locationcatch <pokemon>
- Attempt to catch a selected Pokemoninspect <pokemon>
- Display the info of the selected (caught) Pokemonpokedex
- List any caught Pokemon
main.go
- entrypointrepl.go
- controls the REPL loop for the pokedexrepl_test.go
- contains tests for these functions
- Commands are listed in their relevant files:
- Help/Exit in
commands.go
- Map commands in
commands_map.go
(map,mapb,explore) - Pokemon related commands in
commands_pokemon.go
(catch,inspect,pokedex)
- Help/Exit in
- There are two internal packages:
- Pokeapi (
internal/pokeapi
) calls pokeapi.co to fetch datatypes.go
- types for the pokeapi calls & Pokemon dataconstants.go
- constants for the apiclient.go
- api clientlocations.go
- functions to make requests to thelocation-area
endpointpokemon.go
- functions to make requests to thepokemon
endpoint
- Pokecache (
internal/pokecache
) caches api requests for performancetypes.go
- types for the cache structurecache_functions.go
- handle cache creation & functionalitycache_test.go
- tests for cache functions
- Pokeapi (
This project was built as part of the Build a Pokedex course on Boot.Dev