Reset bold attribute
Serge Voilokov
6 years ago
41 | 41 |
// https://en.wikipedia.org/wiki/ANSI_escape_code#Colors.
|
42 | 42 |
|
43 | 43 |
var (
|
44 | |
resetColorBytes = []byte("\x1b[39;49m")
|
|
44 |
resetColorBytes = []byte("\x1b[39;49;22m")
|
45 | 45 |
fgColorBytes [][]byte
|
46 | 46 |
bgColorBytes [][]byte
|
47 | 47 |
)
|
26 | 26 |
if err := logger.Log("a", 1); err != nil {
|
27 | 27 |
t.Fatal(err)
|
28 | 28 |
}
|
29 | |
if want, have := "\x1b[32;1m\x1b[47;1ma=1\n\x1b[39;49m", buf.String(); want != have {
|
|
29 |
if want, have := "\x1b[32;1m\x1b[47;1ma=1\n\x1b[39;49;22m", buf.String(); want != have {
|
30 | 30 |
t.Errorf("\nwant %#v\nhave %#v", want, have)
|
31 | 31 |
}
|
32 | 32 |
}
|