-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli_command.go
More file actions
52 lines (50 loc) · 1.23 KB
/
cli_command.go
File metadata and controls
52 lines (50 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package main
type cliCommand struct {
name string
description string
callback func(*config, ...string) error
}
func getCommands() map[string]cliCommand {
return map[string]cliCommand{
"help": {
name: "help",
description: "Displays a help message",
callback: cmdHelp,
},
"map": {
name: "mapf",
description: "Displays the name of the next 20 locations",
callback: cmdMapf,
},
"mapb": {
name: "mapb",
description: "Displays the name of the previous 20 locations",
callback: cmdMapb,
},
"explore": {
name: "explore <location name>",
description: "Displays the list of pokemon in a location",
callback: cmdExplore,
},
"catch": {
name: "catch <pokemon name>",
description: "Attempt to catch a pokemon by their name",
callback: cmdCatch,
},
"inspect": {
name: "inspect <pokemon name>",
description: "Look at a pokemon that you have already caught",
callback: cmdInspect,
},
"pokedex": {
name: "pokedex",
description: "List all the pokemon that you have caught",
callback: cmdPokedex,
},
"exit": {
name: "exit",
description: "Exit the Pokedex",
callback: cmdExit,
},
}
}