From e606913c4ee45fec232e67e70105fb6c866b95d9 Mon Sep 17 00:00:00 2001 From: Albert Nigmatzianov Date: Sun, 28 May 2017 12:56:30 +0200 Subject: [PATCH] Fix typos --- README.md | 4 ++-- command.go | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f26db62b..9a3f28e0 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/command.go b/command.go index f37667f1..e85bf51a 100644 --- a/command.go +++ b/command.go @@ -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.