4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-13 23:06:28 +00:00

Update vendor (#1414)

This commit is contained in:
Wim
2021-03-20 22:40:23 +01:00
committed by GitHub
parent 3a8857c8c9
commit ee5d9b43b5
187 changed files with 6746 additions and 1611 deletions

View File

@ -34,6 +34,7 @@ Other examples
```go
Color(s, "red") // red
Color(s, "red+d") // red dim
Color(s, "red+b") // red bold
Color(s, "red+B") // red blinking
Color(s, "red+u") // red underline
@ -73,6 +74,7 @@ Foreground Attributes
* B = Blink
* b = bold
* h = high intensity (bright)
* d = dim
* i = inverse
* s = strikethrough
* u = underline

View File

@ -24,9 +24,11 @@ const (
highIntensityBG = 100
start = "\033["
normal = "0;"
bold = "1;"
blink = "5;"
dim = "2;"
underline = "4;"
blink = "5;"
inverse = "7;"
strikethrough = "9;"
@ -164,10 +166,14 @@ func colorCode(style string) *bytes.Buffer {
buf.WriteString(start)
base := normalIntensityFG
buf.WriteString(normal) // reset any previous style
if len(fgStyle) > 0 {
if strings.Contains(fgStyle, "b") {
buf.WriteString(bold)
}
if strings.Contains(fgStyle, "d") {
buf.WriteString(dim)
}
if strings.Contains(fgStyle, "B") {
buf.WriteString(blink)
}

View File

@ -58,6 +58,7 @@ Attributes
B = Blink foreground
u = underline foreground
h = high intensity (bright) foreground, background
d = dim foreground
i = inverse
Wikipedia ANSI escape codes [Colors](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors)