Skip to content

Commit

Permalink
chore: rename WithCache to the more appropriate WithColorCache
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Sep 20, 2022
1 parent 6809913 commit 20f9656
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions output.go
Expand Up @@ -87,9 +87,9 @@ func WithProfile(profile Profile) func(*Output) {
}
}

// WithCache returns a new Output with fore- and background color values
// WithColorCache returns a new Output with fore- and background color values
// pre-fetched and cached.
func WithCache(v bool) func(*Output) {
func WithColorCache(v bool) func(*Output) {
return func(o *Output) {
o.cache = v

Expand Down
2 changes: 1 addition & 1 deletion termenv_test.go
Expand Up @@ -386,7 +386,7 @@ func TestPseudoTerm(t *testing.T) {
}

func TestCache(t *testing.T) {
o := NewOutput(os.Stdout, WithCache(true), WithProfile(TrueColor))
o := NewOutput(os.Stdout, WithColorCache(true), WithProfile(TrueColor))

if o.cache != true {
t.Errorf("Expected cache to be active, got %t", o.cache)
Expand Down

0 comments on commit 20f9656

Please sign in to comment.