github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/mod_getmode_vendor.txt (about) 1 env GO111MODULE=on 2 3 go get -d rsc.io/quote@v1.5.1 4 go mod vendor 5 env GOPATH=$WORK/empty 6 env GOPROXY=file:///nonexist 7 8 go list -mod=vendor 9 go list -mod=vendor -f '{{with .Module}}{{.Path}} {{.Version}}{{end}} {{.Dir}}' all 10 stdout '^rsc.io/quote v1.5.1 .*vendor[\\/]rsc.io[\\/]quote$' 11 stdout '^golang.org/x/text v0.0.0.* .*vendor[\\/]golang.org[\\/]x[\\/]text[\\/]language$' 12 13 ! go list -mod=vendor -m rsc.io/quote@latest 14 stderr 'go list -m: rsc.io/quote@latest: cannot query module due to -mod=vendor' 15 ! go get -mod=vendor -u 16 stderr 'flag provided but not defined: -mod' 17 18 # Since we don't have a complete module graph, 'go list -m' queries 19 # that require the complete graph should fail with a useful error. 20 ! go list -mod=vendor -m all 21 stderr 'go list -m: can''t compute ''all'' using the vendor directory\n\t\(Use -mod=mod or -mod=readonly to bypass.\)' 22 ! go list -mod=vendor -m ... 23 stderr 'go list -m: can''t match module patterns using the vendor directory\n\t\(Use -mod=mod or -mod=readonly to bypass.\)' 24 25 -- go.mod -- 26 module x 27 28 -- x.go -- 29 package x 30 import _ "rsc.io/quote"