• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

muesli / termenv / 5981796586
57%
master: 50%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/actions/checkout-6
DEFAULT BRANCH: master
Ran 26 Aug 2023 12:52AM UTC
Jobs 1
Files 12
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Aug 2023 12:51AM UTC coverage: 57.081% (-0.2%) from 57.267%
5981796586

push

github

aymanbagabas
fix: read fore/background colors on first access

Caching the colors in OutputOption makes the order of options important.
For example, if you're using WithUnsafe _after_ WithColorCache, the
colors wouldn't respect the `unsafe` option since the colors get cached
_during_ the execution of WithColorCache option.

Another example, is the use of a custom environ using the WithEnvironment
option. If WithEnvironment comes _after_ WithColorCache, reading the
terminal colors won't respect the values in the environment.

Instead, don't read the colors in WithColorCache and make the user
opt-in if they want to cache the colors right after creating a new
output using ForegroundColor and BackgroundColor.

```go
// To cache the colors after creating an output
output := NewOutput(os.Stderr)
_ = output.ForegroundColor()
_ = output.BackgroundColor()
```

524 of 918 relevant lines covered (57.08%)

8.85 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5981796586.1 26 Aug 2023 12:52AM UTC 0
57.08
GitHub Action Run
Source Files on build 5981796586
Detailed source file information is not available for this build.
  • Back to Repo
  • 9de16e1a on github
  • Prev Build on cach-default (#5981724053)
  • Next Build on color-cache (#5981801130)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc