Skip to content

Just a hint: how to make color pkg works in go test command.Β #234

@92hackers

Description

@92hackers

Currently, this package does not works when run command go test.

Such as t.Errorf("error message") will not print colored text content.

A bypass solution:

First, color.NoColor = false is a must to config.

Them, color.Red("error message") + t.FailNow() == t.Errorf()

And it works for me now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions