Skip to content

Commit

Permalink
add: Bold func to generate bold text
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhas committed Dec 31, 2018
1 parent 4fb1c03 commit 81dc47c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ func PrintRed(text string) {
log.Println("\x1B[31m" + text + "\033[0m")
}

// Bold .
func Bold(text string) string {
return "\x1B[1m" + text + "\033[0m"
}

// PrintBold prints a bold message
func PrintBold(text string) {
log.Println("\x1B[1m" + text + "\033[0m")
log.Println(Bold(text))
}

// Fatal prints fatal message and exits process
Expand Down

0 comments on commit 81dc47c

Please sign in to comment.