Skip to content

Commit 00c0bef

Browse files
internal/multilinediff: change string concatenation to use strings.Repeat instead (#284)
1 parent 66e8e86 commit 00c0bef

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

internal/multilinediff/multilinediff.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ func (l diffLine) toLine(length int) string {
6363

6464
line += l.old
6565

66-
for i := 0; i < length-len(l.old); i++ {
67-
line += " "
68-
}
69-
66+
line += strings.Repeat(" ", length-len(l.old))
7067
line += " "
7168

7269
line += l.new

0 commit comments

Comments
 (0)