govulncheck: use proper go env variables everywhere

Change-Id: I5c47125f00c1f99688e1bd6bfd57b720c99c7261
Reviewed-on: https://go-review.googlesource.com/c/exp/+/370914
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Zvonimir Pavlinovic <zpavlinovic@google.com>
This commit is contained in:
Zvonimir Pavlinovic 2021-12-10 09:13:33 -08:00
Родитель e15458d83c
Коммит 596ef3bc44
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -234,7 +234,7 @@ func run(cfg *packages.Config, patterns []string, importsOnly bool, dbClient cli
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to fetch vulnerabilities: %v", err) return nil, fmt.Errorf("failed to fetch vulnerabilities: %v", err)
} }
modVulns = modVulns.Filter(runtime.GOOS, runtime.GOARCH) modVulns = modVulns.Filter(lookupEnv("GOOS", runtime.GOOS), lookupEnv("GOARCH", runtime.GOARCH))
if *verboseFlag { if *verboseFlag {
log.Printf("\t%d known vulnerabilities.\n", modVulns.Num()) log.Printf("\t%d known vulnerabilities.\n", modVulns.Num())
} }