github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/cmd_import_error.txt (about) 1 env GO111MODULE=on 2 3 # Regression test for golang.org/issue/31031: 4 # Importing or loading a non-existent package in cmd/ should print 5 # a clear error in module mode. 6 7 ! go list cmd/unknown 8 stderr '^can''t load package: package cmd/unknown is not in GOROOT \('$GOROOT'[/\\]src[/\\]cmd[/\\]unknown\)$' 9 10 go list -f '{{range .DepsErrors}}{{.Err}}{{end}}' x.go 11 stdout '^package cmd/unknown is not in GOROOT \('$GOROOT'[/\\]src[/\\]cmd[/\\]unknown\)$' 12 13 -- x.go -- 14 package x 15 16 import _ "cmd/unknown"