blob: bb6adfdab30f3bdc52fce4dca064a29b1622de44 [file] [log] [blame]
#####
# Test of missing go.mod error message.
$ govulncheck -C ${moddir}/nogomod . --> FAIL 1
govulncheck is an experimental tool. Share feedback at https://go.dev/s/govulncheck-feedback.
Using go1.18 and govulncheck@v0.0.0-00000000000-20000101010101 with
vulnerability data from testdata/vulndb-v1 (last modified 01 Jan 21 00:00 UTC).
govulncheck: no go.mod file
govulncheck only works with Go modules. Try navigating to your module directory.
Otherwise, run go mod init to make your project a module.
See https://go.dev/doc/modules/managing-dependencies for more information.
#####
# Test of handing a binary to source mode
$ govulncheck ${vuln_binary} --> FAIL 2
govulncheck: myfile is a file.
By default, govulncheck runs source analysis on Go modules.
Did you mean to run govulncheck with -mode=binary?
For details, run govulncheck -h.
#####
# Test of handing an invalid package pattern to source mode
$ govulncheck -C ${moddir}/vuln blah --> FAIL 1
govulncheck is an experimental tool. Share feedback at https://go.dev/s/govulncheck-feedback.
Using go1.18 and govulncheck@v0.0.0-00000000000-20000101010101 with
vulnerability data from testdata/vulndb-v1 (last modified 01 Jan 21 00:00 UTC).
govulncheck: loading packages:
There are errors with the provided package patterns:
-: package foo is not in GOROOT (/tmp/foo)
For details on package patterns, see https://pkg.go.dev/cmd/go#hdr-Package_lists_and_patterns.