commit | 1f71342c1ee78c126bcb69cd26ed8c2be7e016b3 | [log] [tgz] |
---|---|---|
author | Yasuhiro Matsumoto <[email protected]> | Fri Jan 10 08:29:27 2025 |
committer | Yasuhiro Matsumoto <[email protected]> | Fri Jan 10 08:29:27 2025 |
tree | a0a471030c1ca385711ed448d547634f562d9b13 | |
parent | 4503567acadfc8967131e7708f241b77589eb28b [diff] |
update deps
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)