MCPcopy Index your code
hub / github.com/coder/slog / shouldColor

Function shouldColor

internal/entryhuman/entry.go:392–394  ·  view source on GitHub ↗
(w io.Writer)

Source from the content-addressed store, hash-verified

390}
391
392func shouldColor(w io.Writer) bool {
393 return isTTY(w) || os.Getenv("FORCE_COLOR") != ""
394}
395
396// quotes quotes a string so that it is suitable
397// as a key for a map or in general some output that

Callers 2

renderFunction · 0.85
resetFunction · 0.85

Calls 1

isTTYFunction · 0.85

Tested by

no test coverage detected