diff --git a/pkg/commands/patch/patch_builder.go b/pkg/commands/patch/patch_builder.go index 3fc8ebcf7..1edce0741 100644 --- a/pkg/commands/patch/patch_builder.go +++ b/pkg/commands/patch/patch_builder.go @@ -286,11 +286,5 @@ func (p *PatchBuilder) NewPatchRequired(from string, to string, reverse bool) bo } func (p *PatchBuilder) AllFilesInPatch() []string { - files := make([]string, 0, len(p.fileInfoMap)) - - for filename := range p.fileInfoMap { - files = append(files, filename) - } - - return files + return lo.Keys(p.fileInfoMap) }