1
0
mirror of https://gitea.com/Sirherobrine23/tea.git synced 2024-07-15 15:26:23 -03:00
tea/vendor/github.com/mattn/go-colorable
6543 7ac3ffcc1b Use Survey For Interactions With User (#186)
fixes

Use Survey For Interactions With User

Add Vendor "github.com/AlecAivazis/survey/v2"

Co-authored-by: Norwin Roosen <git@nroo.de>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/186
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: Norwin <noerw@noreply.gitea.io>
2020-10-03 02:54:09 +00:00
..
.travis.yml Use Survey For Interactions With User (#186) 2020-10-03 02:54:09 +00:00
colorable_appengine.go Use Survey For Interactions With User (#186) 2020-10-03 02:54:09 +00:00
colorable_others.go Use Survey For Interactions With User (#186) 2020-10-03 02:54:09 +00:00
colorable_windows.go Use Survey For Interactions With User (#186) 2020-10-03 02:54:09 +00:00
go.mod Use Survey For Interactions With User (#186) 2020-10-03 02:54:09 +00:00
go.sum Use Survey For Interactions With User (#186) 2020-10-03 02:54:09 +00:00
go.test.sh Use Survey For Interactions With User (#186) 2020-10-03 02:54:09 +00:00
LICENSE Use Survey For Interactions With User (#186) 2020-10-03 02:54:09 +00:00
noncolorable.go Use Survey For Interactions With User (#186) 2020-10-03 02:54:09 +00:00
README.md Use Survey For Interactions With User (#186) 2020-10-03 02:54:09 +00: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)