Skip to content

Commit

Permalink
Add color to warn messages
Browse files Browse the repository at this point in the history
  • Loading branch information
acook committed Apr 17, 2021
1 parent cf71049 commit 85fe816
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/blacklight.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ func loadFile(filename string) []rune {
}

func warn(text ...string) {
fmt.Fprint(os.Stderr, "blacklight: ")
fmt.Fprint(os.Stderr, "\033[31mblacklight: ")

for _, line := range text {
fmt.Fprint(os.Stderr, line)
}

fmt.Fprintln(os.Stderr, "")
fmt.Fprintln(os.Stderr, "\033[0m")
}

func cleanup() {
Expand Down

0 comments on commit 85fe816

Please sign in to comment.