-
Notifications
You must be signed in to change notification settings - Fork 24
/
style.go
42 lines (33 loc) · 918 Bytes
/
style.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package io
import "fmt"
const (
boldToken = "\033[1m"
boldBlueToken = "\033[1;34m"
yellowToken = "\033[33m"
greenToken = "\033[32m"
boldRedToken = "\033[1;31m"
grayToken = "\033[90m"
lightGrayToken = "\033[1;37m"
resetToken = "\033[0m"
)
func Bold(s string) string {
return fmt.Sprintf("%s%s%s", boldToken, s, resetToken)
}
func BoldBlue(s string) string {
return fmt.Sprintf("%s%s%s", boldBlueToken, s, resetToken)
}
func BoldRed(s string) string {
return fmt.Sprintf("%s%s%s", boldRedToken, s, resetToken)
}
func Green(s string) string {
return fmt.Sprintf("%s%s%s", greenToken, s, resetToken)
}
func Yellow(s string) string {
return fmt.Sprintf("%s%s%s", yellowToken, s, resetToken)
}
func Gray(s string) string {
return fmt.Sprintf("%s%s%s", grayToken, s, resetToken)
}
func LightGray(s string) string {
return fmt.Sprintf("%s%s%s", lightGrayToken, s, resetToken)
}