Skip to content

Commit

Permalink
internal/scan: refactor to remove redundant code
Browse files Browse the repository at this point in the history
Since binary.go already uses build tags, the two removed files are now
redundant. Replaced the call to the function in those files to a call
to vulncheck.Binary directly.

Change-Id: Ib1560a4303df2355ce7c121258aef091bab9ee01
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/514902
Run-TryBot: Maceo Thompson <maceothompson@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
  • Loading branch information
Maceo Thompson committed Aug 1, 2023
1 parent 81563a3 commit b2f5f90
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 42 deletions.
2 changes: 1 addition & 1 deletion internal/scan/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func runBinary(ctx context.Context, handler govulncheck.Handler, cfg *config, cl
if err := handler.Progress(p); err != nil {
return err
}
vr, err := binary(ctx, exe, &cfg.Config, client)
vr, err := vulncheck.Binary(ctx, exe, &cfg.Config, client)
if err != nil {
return fmt.Errorf("govulncheck: %v", err)
}
Expand Down
21 changes: 0 additions & 21 deletions internal/scan/binary_118.go

This file was deleted.

20 changes: 0 additions & 20 deletions internal/scan/binary_not118.go

This file was deleted.

0 comments on commit b2f5f90

Please sign in to comment.