3 [![Godoc Reference](https://godoc.org/github.com/mattn/go-colorable?status.svg)](http://godoc.org/github.com/mattn/go-colorable)
4 [![Build Status](https://travis-ci.org/mattn/go-colorable.svg?branch=master)](https://travis-ci.org/mattn/go-colorable)
5 [![Coverage Status](https://coveralls.io/repos/github/mattn/go-colorable/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-colorable?branch=master)
6 [![Go Report Card](https://goreportcard.com/badge/mattn/go-colorable)](https://goreportcard.com/report/mattn/go-colorable)
8 Colorable writer for windows.
10 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.)
11 This package is possible to handle escape sequence for ansi color on windows.
15 ![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/bad.png)
20 ![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/good.png)
25 logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true})
26 logrus.SetOutput(colorable.NewColorableStdout())
28 logrus.Info("succeeded")
29 logrus.Warn("not correct")
30 logrus.Error("something error")
34 You can compile above code on non-windows OSs.
39 $ go get github.com/mattn/go-colorable
48 Yasuhiro Matsumoto (a.k.a mattn)