Minor improvements.

pull/599/head
Oliver 3 years ago
parent ba9f3a6fa1
commit b610d436f3

@ -128,19 +128,19 @@ func (a *ansi) Write(text []byte) (int, error) {
for index, field := range fields {
switch field {
case "1", "01":
if strings.IndexRune(a.attributes, 'b') < 0 {
if !strings.ContainsRune(a.attributes, 'b') {
a.attributes += "b"
}
case "2", "02":
if strings.IndexRune(a.attributes, 'd') < 0 {
if !strings.ContainsRune(a.attributes, 'd') {
a.attributes += "d"
}
case "4", "04":
if strings.IndexRune(a.attributes, 'u') < 0 {
if !strings.ContainsRune(a.attributes, 'u') {
a.attributes += "u"
}
case "5", "05":
if strings.IndexRune(a.attributes, 'l') < 0 {
if !strings.ContainsRune(a.attributes, 'l') {
a.attributes += "l"
}
case "22":

@ -12,7 +12,7 @@ import (
)
type company struct {
Name string `json:name`
Name string `json:"name"`
}
func main() {

Loading…
Cancel
Save