Skip to content

Commit 00d043d

Browse files
committed
Cleanup: implement AllFilesInPatch using lo.Keys
Curiously, the function was never called so far, but we're going to use it later in this branch.
1 parent eebc39d commit 00d043d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pkg/commands/patch/patch_builder.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,5 @@ func (p *PatchBuilder) NewPatchRequired(from string, to string, reverse bool) bo
286286
}
287287

288288
func (p *PatchBuilder) AllFilesInPatch() []string {
289-
files := make([]string, 0, len(p.fileInfoMap))
290-
291-
for filename := range p.fileInfoMap {
292-
files = append(files, filename)
293-
}
294-
295-
return files
289+
return lo.Keys(p.fileInfoMap)
296290
}

0 commit comments

Comments
 (0)