Skip to content

Commit

Permalink
Minor improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver committed Apr 27, 2021
1 parent ba9f3a6 commit b610d43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ansi.go
Expand Up @@ -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":
Expand Down
2 changes: 1 addition & 1 deletion demos/inputfield/autocompleteasync/main.go
Expand Up @@ -12,7 +12,7 @@ import (
)

type company struct {
Name string `json:name`
Name string `json:"name"`
}

func main() {
Expand Down

0 comments on commit b610d43

Please sign in to comment.