github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/mattn/go-colorable/README.md (about) 1 # go-colorable 2 3 Colorable writer for windows. 4 5 For example, most of logger packages doesn't show colors on windows. (I know we can do it with ansicon. But I don't want.) 6 This package is possible to handle escape sequence for ansi color on windows. 7 8 ## Too Bad! 9 10  11 12 13 ## So Good! 14 15  16 17 ## Usage 18 19 ```go 20 logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true}) 21 logrus.SetOutput(colorable.NewColorableStdout()) 22 23 logrus.Info("succeeded") 24 logrus.Warn("not correct") 25 logrus.Error("something error") 26 logrus.Fatal("panic") 27 ``` 28 29 You can compile above code on non-windows OSs. 30 31 ## Installation 32 33 ``` 34 $ go get github.com/mattn/go-colorable 35 ``` 36 37 # License 38 39 MIT 40 41 # Author 42 43 Yasuhiro Matsumoto (a.k.a mattn)