Skip to content

Commit

Permalink
remove unneeded sprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
kuiperda committed Sep 30, 2024
1 parent 69c5526 commit 2aab285
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ottl/ottlfuncs/func_to_key_value_string.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func convertMapToKV(target pcommon.Map, delimiter string, pairDelimiter string,
func buildKVString(k string, v pcommon.Value, delimiter string, pairDelimiter string) string {
key := escapeAndQuoteKV(k, delimiter, pairDelimiter)
value := escapeAndQuoteKV(v.AsString(), delimiter, pairDelimiter)
return fmt.Sprintf("%s%s%v", key, delimiter, value)
return key + delimiter + value
}

func escapeAndQuoteKV(s string, delimiter string, pairDelimiter string) string {
Expand Down

0 comments on commit 2aab285

Please sign in to comment.