Skip to content

Decouple from ANSI colors utilities in utils package #1624

@mislav

Description

@mislav

Utility functions like utils.Green() can only be overridden on the package level, therefore they aren't suitable for stubbing out in IOStreams-based tests.

In #1552, I proposed to add a ColorScheme object to IOStreams. Such an approach allows us to both stub coloring (or lack thereof) in tests, as well as define a color scheme based on user's config.

Once that lands, I propose to run with that approach and convert other usages until utils/color.go is gone. This will give us some versatility for #364

Metadata

Metadata

Assignees

Labels

help wantedContributions welcometech-debtA chore that addresses technical debt

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions