github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/mod_bad_domain.txt (about) 1 env GO111MODULE=on 2 3 # explicit get should report errors about bad names 4 ! go get appengine 5 stderr '^go get appengine: package appengine is not in GOROOT \(.*\)$' 6 ! go get x/y.z 7 stderr 'malformed module path "x/y.z": missing dot in first path element' 8 9 # 'go list -m' should report errors about module names, never GOROOT. 10 ! go list -m -versions appengine 11 stderr 'malformed module path "appengine": missing dot in first path element' 12 ! go list -m -versions x/y.z 13 stderr 'malformed module path "x/y.z": missing dot in first path element' 14 15 # build should report all unsatisfied imports, 16 # but should be more definitive about non-module import paths 17 ! go build ./useappengine 18 stderr 'cannot find package' 19 ! go build ./usenonexistent 20 stderr 'cannot find module providing package nonexistent.rsc.io' 21 22 # go mod vendor and go mod tidy should ignore appengine imports. 23 rm usenonexistent/x.go 24 go mod tidy 25 go mod vendor 26 27 -- go.mod -- 28 module x 29 30 -- useappengine/x.go -- 31 package useappengine 32 import _ "appengine" // package does not exist 33 -- usenonexistent/x.go -- 34 package usenonexistent 35 import _ "nonexistent.rsc.io" // domain does not exist