mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
Update read me example
This commit is contained in:
parent
39583856c0
commit
88e482c582
1 changed files with 2 additions and 2 deletions
|
@ -120,9 +120,9 @@ More documentation about flags is available at https://github.com/spf13/pflag
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
cmdTimes().IntVarP(&echoTimes, "times", "t", 1, "times to echo the input")
|
cmdTimes().Flags().IntVarP(&echoTimes, "times", "t", 1, "times to echo the input")
|
||||||
|
|
||||||
var commander = cobra.Commander()
|
var commander = cobra.NewCommander()
|
||||||
commander.SetName("CobraExample")
|
commander.SetName("CobraExample")
|
||||||
commander.AddCommand(cmdPrint, cmdEcho)
|
commander.AddCommand(cmdPrint, cmdEcho)
|
||||||
cmdEcho.AddCommand(cmdTimes)
|
cmdEcho.AddCommand(cmdTimes)
|
||||||
|
|
Loading…
Reference in a new issue