Just a hint: how to make `color` pkg works in `go test` command.
Author: 92hackersCreated Jun 18, 2024Updated Aug 23, 2024
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.
Source: fatih/color