From 00d043d743fa1180bcb8763798058a111f3218f1 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Tue, 1 Jul 2025 11:23:16 +0200 Subject: [PATCH] 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. --- pkg/commands/patch/patch_builder.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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) }