Skip to content

Commit 4ab8f6b

Browse files
committed
JMS #2: Renamed "Action" type to handler.
1 parent c094d7e commit 4ab8f6b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎cli.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var Commands []Command
1818
var Flags []Flag
1919

2020
// The action to execute when no subcommands are specified
21-
var DefaultAction = ShowHelp
21+
var Action = ShowHelp
2222

2323
func Run(args []string) {
2424
if len(args) > 1 {
@@ -32,16 +32,16 @@ func Run(args []string) {
3232
}
3333

3434
// Run default Action
35-
DefaultAction("")
35+
Action("")
3636
}
3737

3838
type Command struct {
3939
Name string
4040
ShortName string
4141
Usage string
4242
Description string
43-
Action Action
43+
Action Handler
4444
Flags flag.FlagSet
4545
}
4646

47-
type Action func(name string)
47+
type Handler func(name string)

0 commit comments

Comments
 (0)