Skip to content

Commit

Permalink
fix argument ordering
Browse files Browse the repository at this point in the history
Signed-off-by: Harsh Thakur <[email protected]>
  • Loading branch information
RealHarshThakur committed Sep 20, 2023
1 parent 62d26b4 commit cb525c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/patch/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ func NewPatchCmd() *cobra.Command {
ua.workingFolder,
ua.format,
ua.output,
ua.ignoreError,
bkopts,

Check warning on line 57 in pkg/patch/cmd.go

View check run for this annotation

Codecov / codecov/patch

pkg/patch/cmd.go#L57

Added line #L57 was not covered by tests
ua.ignoreError,
ua.push)

Check warning on line 59 in pkg/patch/cmd.go

View check run for this annotation

Codecov / codecov/patch

pkg/patch/cmd.go#L59

Added line #L59 was not covered by tests
},
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/patch/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Check warning on line 33 in pkg/patch/patch.go

View check run for this annotation

Codecov / codecov/patch

pkg/patch/patch.go#L33

Added line #L33 was not covered by tests
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)

Check warning on line 39 in pkg/patch/patch.go

View check run for this annotation

Codecov / codecov/patch

pkg/patch/patch.go#L39

Added line #L39 was not covered by tests
}()

select {
Expand All @@ -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)

Check warning on line 65 in pkg/patch/patch.go

View check run for this annotation

Codecov / codecov/patch

pkg/patch/patch.go#L64-L65

Added lines #L64 - L65 were not covered by tests
if err != nil {
return err
Expand Down

0 comments on commit cb525c9

Please sign in to comment.