From 7e736d6bb56d450b00e4a091ab5e49eff63d60c3 Mon Sep 17 00:00:00 2001 From: Harsh Thakur Date: Wed, 20 Sep 2023 16:23:57 +0530 Subject: [PATCH] fix argument ordering Signed-off-by: Harsh Thakur --- pkg/patch/cmd.go | 2 +- pkg/patch/patch.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/patch/cmd.go b/pkg/patch/cmd.go index 88989531..1223f98b 100644 --- a/pkg/patch/cmd.go +++ b/pkg/patch/cmd.go @@ -54,8 +54,8 @@ func NewPatchCmd() *cobra.Command { ua.workingFolder, ua.format, ua.output, - ua.ignoreError, bkopts, + ua.ignoreError, ua.push) }, } diff --git a/pkg/patch/patch.go b/pkg/patch/patch.go index 2fbef7eb..64841e39 100644 --- a/pkg/patch/patch.go +++ b/pkg/patch/patch.go @@ -30,13 +30,13 @@ const ( ) // Patch command applies package updates to an OCI image given a vulnerability report. -func Patch(ctx context.Context, timeout time.Duration, buildkitAddr, image, reportFile, patchedTag, workingFolder, format, output string, ignoreError, bkOpts buildkit.Opts, push bool) error { +func Patch(ctx context.Context, timeout time.Duration, image, reportFile, patchedTag, workingFolder, format, output string, bkOpts buildkit.Opts, ignoreError, push bool) error { timeoutCtx, cancel := context.WithTimeout(ctx, timeout) defer cancel() ch := make(chan error) go func() { - ch <- patchWithContext(timeoutCtx, buildkitAddr, image, reportFile, patchedTag, workingFolder, format, output, ignoreError, bkOpts, push) + ch <- patchWithContext(timeoutCtx, image, reportFile, patchedTag, workingFolder, format, output, bkOpts, ignoreError, push) }() select { @@ -61,7 +61,7 @@ func removeIfNotDebug(workingFolder string) { } } -func patchWithContext(ctx context.Context, buildkitAddr, image, reportFile, patchedTag, workingFolder, format, output string, ignoreError, bkOpts buildkit.Opts, push bool) error { +func patchWithContext(ctx context.Context, image, reportFile, patchedTag, workingFolder, format, output string, bkOpts buildkit.Opts, ignoreError, push bool) error { patchedImageName, err := patchedImageTarget(image, patchedTag) if err != nil { return err