Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
392
func
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
render
Function · 0.85
reset
Function · 0.85
Calls
1
isTTY
Function · 0.85
Tested by
no test coverage detected