| commit | 50c5b535976d400c961beb3e147096209f5be59a | [log] [tgz] |
|---|---|---|
| author | Oleksandr Redko <[email protected]> | Mon Dec 09 20:01:24 2024 |
| committer | Oleksandr Redko <[email protected]> | Mon Dec 09 20:01:47 2024 |
| tree | 98894e0e15dc111dbd2b750aeef15ed3a7e95617 | |
| parent | 603fb50de6b0dcd39ea6d96d9dad3477465519a4 [diff] |
Fix typo in TestNonColorableNil
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)