Registry / utility / jwalton-go-supportscolor

jwalton-go-supportscolor

JSON →
library1.2.0gogounverified

Package supportscolor detects whether a terminal supports color and enables ANSI color support on Windows.

go get github.com/jwalton/go-supportscolor
INSTALL
IMPORT
SIG · JWALTON-GO-SUPPORT
J
jwalton-go-supportscolor
utilitygov1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

supportscolor
github.com/jwalton/go-supportscolor

Check if stdout supports color

package main import ( "fmt" "github.com/jwalton/go-supportscolor" ) func main() { if supportscolor.Stdout().Level > 0 { fmt.Println("Color supported") } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.2.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
jwalton-go-supportscolor — go get jwalton-go-supportscolor · libregistry