mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
Adding a separate command as a run value.
This commit is contained in:
parent
3d8285f415
commit
1be06e4e1a
1 changed files with 5 additions and 3 deletions
|
@ -35,9 +35,11 @@ var cmdTimes = &Command{
|
||||||
Use: "times [string to echo]",
|
Use: "times [string to echo]",
|
||||||
Short: "Echo anything to the screen more times",
|
Short: "Echo anything to the screen more times",
|
||||||
Long: `an slightly useless command for testing.`,
|
Long: `an slightly useless command for testing.`,
|
||||||
Run: func(cmd *Command, args []string) {
|
Run: timesRunner,
|
||||||
|
}
|
||||||
|
|
||||||
|
func timesRunner(cmd *Command, args []string) {
|
||||||
tt = args
|
tt = args
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func flagInit() {
|
func flagInit() {
|
||||||
|
|
Loading…
Reference in a new issue