From f2434591d94ebcb537d0091f1034c69164eb1fd2 Mon Sep 17 00:00:00 2001 From: "Anand Babu (AB) Periasamy" Date: Sun, 19 Jul 2015 15:27:30 -0700 Subject: [PATCH] fix error strings --- cast-url.go | 4 ++-- pkg/console/console.go | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cast-url.go b/cast-url.go index c8356a45..7a34d85f 100644 --- a/cast-url.go +++ b/cast-url.go @@ -76,7 +76,7 @@ func checkCastSyntax(ctx *cli.Context) { } if !srcContent.Type.IsRegular() { if srcContent.Type.IsDir() { - console.Fatalf("Source ‘%s’ is a directory. Please use ‘%s...’ ellipses sufix to copy a directory and its contents recursively.\n", srcURL, srcURL) + console.Fatalf("Source ‘%s’ is a directory. Please use ‘%s...’ to recursively copy this directory and its contents.\n", srcURL, srcURL) } console.Fatalf("Source ‘%s’ is not a regular file.\n", srcURL) } @@ -123,7 +123,7 @@ func checkCastSyntax(ctx *cli.Context) { console.Fatalf("Unable to stat source ‘%s’. %s\n", srcURL, iodine.New(err, nil)) } - if srcContent.Type.IsRegular() { // Elipses is supported only for directories. + if srcContent.Type.IsRegular() { // Ellipses is supported only for directories. console.Fatalf("Source ‘%s’ is not a directory. %s\n", stripRecursiveURL(srcURL), iodine.New(err, nil)) } // All targets should be a valid folder. diff --git a/pkg/console/console.go b/pkg/console/console.go index d5158bab..86b1d944 100644 --- a/pkg/console/console.go +++ b/pkg/console/console.go @@ -103,21 +103,21 @@ var ( // Fatal print a error message and exit Fatal = func(data ...interface{}) { defer os.Exit(1) - print(themesDB[currThemeName].Error, data...) + print(themesDB[currThemeName].Fatal, data...) return } // Fatalf print a error message with a format specified and exit Fatalf = func(f string, data ...interface{}) { defer os.Exit(1) - printf(themesDB[currThemeName].Error, f, data...) + printf(themesDB[currThemeName].Fatal, f, data...) return } // Fatalln print a error message with a new line and exit Fatalln = func(data ...interface{}) { defer os.Exit(1) - println(themesDB[currThemeName].Error, data...) + println(themesDB[currThemeName].Fatal, data...) return } @@ -212,7 +212,7 @@ var ( mutex.Lock() output := color.Output color.Output = stderrColoredOutput - c.Print(ProgramName() + ": ") + c.Print(ProgramName() + ": ") c.Print(a...) color.Output = output mutex.Unlock() @@ -251,7 +251,7 @@ var ( mutex.Lock() output := color.Output color.Output = stderrColoredOutput - c.Print(ProgramName() + ": ") + c.Print(ProgramName() + ": ") c.Printf(f, a...) color.Output = output mutex.Unlock() @@ -290,7 +290,7 @@ var ( mutex.Lock() output := color.Output color.Output = stderrColoredOutput - c.Print(ProgramName() + ": ") + c.Print(ProgramName() + ": ") c.Println(a...) color.Output = output mutex.Unlock()