Chore: Fix DiffReporter.Paths to properly initialize slice (#70870)

This commit is contained in:
Yuri Tseretyan
2023-06-28 18:08:05 -04:00
committed by GitHub
parent 7f8fe45a06
commit 2e0dae8fa0
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ func (r DiffReport) String() string {
// Paths returns the slice of paths of the current DiffReport
func (r DiffReport) Paths() []string {
var result = make([]string, len(r))
var result = make([]string, 0, len(r))
for _, diff := range r {
result = append(result, diff.Path)
}