Skip to content

Commit

Permalink
internal/vulncheck: emit progress message instead of warning
Browse files Browse the repository at this point in the history
Now that progress messages are hidden under the verbose flag, we should
not be printing anything with fmt.

Change-Id: I30b247ca1793ea7bcc6e4a68e1f0633d3262d7f1
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/581276
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
  • Loading branch information
zpavlinovic committed May 15, 2024
1 parent d837ff8 commit 122c809
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/vulncheck/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ func binary(ctx context.Context, handler govulncheck.Handler, bin *Bin, cfg *gov
}

if bin.GOOS == "" || bin.GOARCH == "" {
fmt.Printf("warning: failed to extract build system specification GOOS: %s GOARCH: %s\n", bin.GOOS, bin.GOARCH)
p := &govulncheck.Progress{Message: fmt.Sprintf("warning: failed to extract build system specification GOOS: %s GOARCH: %s\n", bin.GOOS, bin.GOARCH)}
if err := handler.Progress(p); err != nil {
return nil, err
}
}
affVulns := affectingVulnerabilities(mv, bin.GOOS, bin.GOARCH)
if err := emitModuleFindings(handler, affVulns); err != nil {
Expand Down

0 comments on commit 122c809

Please sign in to comment.