mirror of
https://github.com/spf13/cobra
synced 2024-12-28 07:17:06 +00:00
Fix typos
This commit is contained in:
parent
4a1a7b086e
commit
e606913c4e
2 changed files with 4 additions and 5 deletions
|
@ -230,12 +230,12 @@ Once you have run these three commands you would have an app structure that woul
|
|||
main.go
|
||||
```
|
||||
|
||||
at this point you can run `go run main.go` and it would run your app. `go run
|
||||
At this point you can run `go run main.go` and it would run your app. `go run
|
||||
main.go serve`, `go run main.go config`, `go run main.go config create` along
|
||||
with `go run main.go help serve`, etc would all work.
|
||||
|
||||
Obviously you haven't added your own code to these yet, the commands are ready
|
||||
for you to give them their tasks. Have fun.
|
||||
for you to give them their tasks. Have fun!
|
||||
|
||||
### Configuring the cobra generator
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@ func (c *Command) preRun() {
|
|||
}
|
||||
}
|
||||
|
||||
// Execute Call execute to use the args (os.Args[1:] by default)
|
||||
// Execute uses the args (os.Args[1:] by default)
|
||||
// and run through the command tree finding appropriate matches
|
||||
// for commands and then corresponding flags.
|
||||
func (c *Command) Execute() error {
|
||||
|
@ -743,9 +743,8 @@ func (c *Command) ExecuteC() (cmd *Command, err error) {
|
|||
if !cmd.SilenceUsage && !c.SilenceUsage {
|
||||
c.Println(cmd.UsageString())
|
||||
}
|
||||
return cmd, err
|
||||
}
|
||||
return cmd, nil
|
||||
return cmd, err
|
||||
}
|
||||
|
||||
// InitDefaultHelpFlag adds default help flag to c.
|
||||
|
|
Loading…
Reference in a new issue