ITADN

Just a hint: how to make `color` pkg works in `go test` command.

#234Open92hackers 创建于 2024-06-18
9
92hackerscommented
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.
1 条评论