Skip to content

Commit 203421e

Browse files
authored
Merge pull request #53 from vertti/red-error-details
Color error detail lines red
2 parents 1808ef8 + 8d7a151 commit 203421e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

pkg/output/output.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,15 @@ func PrintResult(r check.Result) {
3636
if r.OK() {
3737
fmt.Printf("%s[OK]%s %s\n", green, reset, formatLabel(r.Name))
3838
indent = " " // align with content after "[OK] "
39+
for _, d := range r.Details {
40+
fmt.Printf("%s%s\n", indent, formatLabel(d))
41+
}
3942
} else {
4043
fmt.Printf("%s[FAIL]%s %s\n", red, reset, formatLabel(r.Name))
4144
indent = " " // align with content after "[FAIL] "
42-
}
43-
for _, d := range r.Details {
44-
fmt.Printf("%s%s\n", indent, formatLabel(d))
45+
for _, d := range r.Details {
46+
fmt.Printf("%s%s%s%s\n", indent, red, d, reset)
47+
}
4548
}
4649
}
4750

0 commit comments

Comments
 (0)