Skip to content

Commit 122c809

Browse files
committed
internal/vulncheck: emit progress message instead of warning
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>
1 parent d837ff8 commit 122c809

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/vulncheck/binary.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ func binary(ctx context.Context, handler govulncheck.Handler, bin *Bin, cfg *gov
6868
}
6969

7070
if bin.GOOS == "" || bin.GOARCH == "" {
71-
fmt.Printf("warning: failed to extract build system specification GOOS: %s GOARCH: %s\n", bin.GOOS, bin.GOARCH)
71+
p := &govulncheck.Progress{Message: fmt.Sprintf("warning: failed to extract build system specification GOOS: %s GOARCH: %s\n", bin.GOOS, bin.GOARCH)}
72+
if err := handler.Progress(p); err != nil {
73+
return nil, err
74+
}
7275
}
7376
affVulns := affectingVulnerabilities(mv, bin.GOOS, bin.GOARCH)
7477
if err := emitModuleFindings(handler, affVulns); err != nil {

0 commit comments

Comments
 (0)