aboutsummaryrefslogtreecommitdiffstats
path: root/_examples/common.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-02-01 09:12:52 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2017-02-01 09:15:18 +0100
commit26095380851db820e95f46983109b4b846dadbba (patch)
treecbc70dca0585b3a5a696ba77f1209d1e552cdbc9 /_examples/common.go
parenta6197bd8c459c7d10717bd9486c17f6c8b3f7f88 (diff)
downloadgo-git-26095380851db820e95f46983109b4b846dadbba.tar.gz
fix example folder
Diffstat (limited to '_examples/common.go')
-rw-r--r--_examples/common.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/_examples/common.go b/_examples/common.go
index 971b0f6..913cb18 100644
--- a/_examples/common.go
+++ b/_examples/common.go
@@ -1,10 +1,9 @@
package examples
import (
+ "fmt"
"os"
"strings"
-
- "github.com/fatih/color"
)
func CheckArgs(arg ...string) {
@@ -19,14 +18,14 @@ func CheckIfError(err error) {
return
}
- color.Red("error: %s", err)
+ fmt.Printf("\x1b[31;1m%s\x1b[0m\n", fmt.Sprintf("error: %s", err))
os.Exit(1)
}
func Info(format string, args ...interface{}) {
- color.Blue(format, args...)
+ fmt.Printf("\x1b[34;1m%s\x1b[0m\n", fmt.Sprintf(format, args...))
}
func Warning(format string, args ...interface{}) {
- color.Cyan(format, args...)
+ fmt.Printf("\x1b[36;1m%s\x1b[0m\n", fmt.Sprintf(format, args...))
}