feat: add example
This commit is contained in:
@@ -108,6 +108,12 @@ func Long(long string) Option {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Example(example string) Option {
|
||||||
|
return func(cmd *cobra.Command) {
|
||||||
|
cmd.Example = example
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func Run(run func(cmd *cobra.Command, args []string)) Option {
|
func Run(run func(cmd *cobra.Command, args []string)) Option {
|
||||||
return func(cmd *cobra.Command) {
|
return func(cmd *cobra.Command) {
|
||||||
cmd.Run = run
|
cmd.Run = run
|
||||||
|
|||||||
Reference in New Issue
Block a user