Skip to content

Commit 72ce4a1

Browse files
Ahmet OeztuerkAhmet Oeztuerk
authored andcommitted
staticcheck: use fmt.Prinftf instead of strings.Builder.WriteString
1 parent 477805c commit 72ce4a1

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

pkg/helper/elastic.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import (
1111
func CreateJSONFromStringMap(input map[string]string) string {
1212
str := strings.Builder{}
1313
for k, v := range input {
14-
//nolint:staticcheck // cant use fmt.Fprintf() on a strings.Builder
15-
str.WriteString(fmt.Sprintf(`,%s:%s`, GenJSONValueString(k), GenJSONValueString(v)))
14+
fmt.Fprintf(&str, ",%s:%s", GenJSONValueString(k), GenJSONValueString(v))
1615
}
1716
return str.String()
1817
}

0 commit comments

Comments
 (0)