From cde8418658360e15fc2b5e1a643aca75126aefb2 Mon Sep 17 00:00:00 2001 From: adamclerk Date: Tue, 9 Feb 2016 09:36:13 -0700 Subject: [PATCH] Fixes spelling issues and import alphabetical issues Using goreportcard.com I noticed a few spelling errors. I really love codegangsta/cli and wanted to help improve it. --- app.go | 2 +- app_test.go | 6 +++--- flag.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app.go b/app.go index 0018656..1ea3fd0 100644 --- a/app.go +++ b/app.go @@ -9,7 +9,7 @@ import ( "time" ) -// App is the main structure of a cli application. It is recomended that +// App is the main structure of a cli application. It is recommended that // an app be created with the cli.NewApp() function type App struct { // The name of the program. Defaults to path.Base(os.Args[0]) diff --git a/app_test.go b/app_test.go index 709f9aa..7feaf1f 100644 --- a/app_test.go +++ b/app_test.go @@ -2,6 +2,7 @@ package cli import ( "bytes" + "errors" "flag" "fmt" "io" @@ -9,7 +10,6 @@ import ( "os" "strings" "testing" -"errors" ) func ExampleApp_Run() { @@ -947,7 +947,7 @@ func TestApp_Run_DoesNotOverwriteErrorFromBefore(t *testing.T) { err := app.Run([]string{"foo"}) if err == nil { - t.Fatalf("expected to recieve error from Run, got none") + t.Fatalf("expected to receive error from Run, got none") } if !strings.Contains(err.Error(), "before error") { @@ -975,7 +975,7 @@ func TestApp_Run_SubcommandDoesNotOverwriteErrorFromBefore(t *testing.T) { err := app.Run([]string{"foo", "bar"}) if err == nil { - t.Fatalf("expected to recieve error from Run, got none") + t.Fatalf("expected to receive error from Run, got none") } if !strings.Contains(err.Error(), "before error") { diff --git a/flag.go b/flag.go index c8fb68b..e951c2d 100644 --- a/flag.go +++ b/flag.go @@ -4,10 +4,10 @@ import ( "flag" "fmt" "os" + "runtime" "strconv" "strings" "time" - "runtime" ) // This flag enables bash-completion for all commands and subcommands @@ -30,7 +30,7 @@ var HelpFlag = BoolFlag{ } // Flag is a common interface related to parsing flags in cli. -// For more advanced flag parsing techniques, it is recomended that +// For more advanced flag parsing techniques, it is recommended that // this interface be implemented. type Flag interface { fmt.Stringer