Subcommand example used non-existent function
This commit is contained in:
parent
f7c1cd9a11
commit
1c561d6228
@ -176,7 +176,7 @@ app.Commands = []cli.Command{
|
|||||||
ShortName: "a",
|
ShortName: "a",
|
||||||
Usage: "add a task to the list",
|
Usage: "add a task to the list",
|
||||||
Action: func(c *cli.Context) {
|
Action: func(c *cli.Context) {
|
||||||
println("added task: ", c.FirstArg())
|
println("added task: ", c.Args().First())
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -184,7 +184,7 @@ app.Commands = []cli.Command{
|
|||||||
ShortName: "c",
|
ShortName: "c",
|
||||||
Usage: "complete a task on the list",
|
Usage: "complete a task on the list",
|
||||||
Action: func(c *cli.Context) {
|
Action: func(c *cli.Context) {
|
||||||
println("completed task: ", c.FirstArg())
|
println("completed task: ", c.Args().First())
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user