Try to detect color support, make color configurable
This commit tries to detect if users can render colors in their terminal and only enables color logs if that is true. It also adds no-color.org's NO_COLOR env var support to allow it to be disabled.
This commit is contained in:
parent
8a614dabc0
commit
73a00c89ff
3 changed files with 28 additions and 0 deletions
1
go.mod
1
go.mod
|
@ -4,6 +4,7 @@ go 1.16
|
|||
|
||||
require (
|
||||
github.com/AlecAivazis/survey/v2 v2.0.5
|
||||
github.com/efekarakus/termcolor v1.0.1 // indirect
|
||||
github.com/gin-gonic/gin v1.7.2
|
||||
github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b
|
||||
github.com/klauspost/compress v1.13.1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue