commit | e7796444f8480bce1f32756e726714853604c9d5 | [log] [tgz] |
---|---|---|
author | Nick Craig-Wood <nick@craig-wood.com> | Sat Sep 28 19:46:12 2019 |
committer | Nick Craig-Wood <nick@craig-wood.com> | Mon Sep 30 17:24:13 2019 |
tree | 9c6348b15958fa4d69467337043a1bb896d917ef | |
parent | 72ec6f98a4a16d5106d74ec2fa11b14d6c5a28b3 [diff] |
Make move to start of line with 0 parameter work - Fixes #40
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.
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.
$ go get github.com/mattn/go-colorable
MIT
Yasuhiro Matsumoto (a.k.a mattn)