Skip to content

Commit

Permalink
Apply code review comment
Browse files Browse the repository at this point in the history
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
  • Loading branch information
AnomalRoil committed Apr 22, 2024
1 parent 5e7b8a3 commit 1b86b6d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,11 @@ func Pairs(kv ...string) MD {
func (md MD) String() string {
var sb strings.Builder
fmt.Fprintf(&sb, "MD{")
needSep := false
for k, v := range md {
if needSep {
if sb.Len() > 3 {
fmt.Fprintf(&sb, ", ")
}
fmt.Fprintf(&sb, "%s=[%s]", k, strings.Join(v, ", "))
needSep = true
}
fmt.Fprintf(&sb, "}")
return sb.String()
Expand Down

0 comments on commit 1b86b6d

Please sign in to comment.