Clone this repo:
  1. e1bb79c Merge pull request #63 from naoyukis/delete_buf by mattn · 6 months ago master v0.1.12
  2. 699629e delete buf by naoyukis · 6 months ago
  3. a1c5ae5 Merge pull request #62 from tklauser/fix-go-version-gh-action by mattn · 8 months ago
  4. 77502a5 Update dependencies by Yasuhiro Matsumoto · 8 months ago v0.1.11
  5. f2a4b66 Use correct field to specify Go version in GitHub action by Tobias Klauser · 8 months ago

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)