1
0
mirror of https://github.com/strongdm/comply synced 2024-07-05 16:21:46 +00:00
comply/vendor/github.com/mattn/go-colorable
Justin McCarthy 7468711b3b
go.mod: update gitlab dep to v0.30.1
Releases after github.com/xanzy/go-gitlab@v0.31.0 introduce breaking
changes to the NewClient call.

Addresses #94
2020-09-14 11:31:56 -07:00
..
.travis.yml go.mod: update gitlab dep to v0.30.1 2020-09-14 11:31:56 -07:00
colorable_appengine.go go.mod: update gitlab dep to v0.30.1 2020-09-14 11:31:56 -07:00
colorable_others.go go.mod: update gitlab dep to v0.30.1 2020-09-14 11:31:56 -07:00
colorable_windows.go go.mod: update gitlab dep to v0.30.1 2020-09-14 11:31:56 -07:00
go.mod go.mod: update gitlab dep to v0.30.1 2020-09-14 11:31:56 -07:00
go.sum go.mod: update gitlab dep to v0.30.1 2020-09-14 11:31:56 -07:00
go.test.sh go.mod: update gitlab dep to v0.30.1 2020-09-14 11:31:56 -07:00
LICENSE Initial commit 2018-05-15 14:13:11 -07:00
noncolorable.go go.mod: update gitlab dep to v0.30.1 2020-09-14 11:31:56 -07:00
README.md go.mod: update gitlab dep to v0.30.1 2020-09-14 11:31:56 -07:00

go-colorable

Build Status Codecov GoDoc Go Report Card

Colorable writer for windows.

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.) This package is possible to handle escape sequence for ansi color on windows.

Too Bad!

So Good!

Usage

logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true})
logrus.SetOutput(colorable.NewColorableStdout())

logrus.Info("succeeded")
logrus.Warn("not correct")
logrus.Error("something error")
logrus.Fatal("panic")

You can compile above code on non-windows OSs.

Installation

$ go get github.com/mattn/go-colorable

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)