1 # Test rejection of pkg@version in GOPATH mode.
2 env GO111MODULE=off
3 ! go get rsc.io/quote@v1.5.1
4 stderr '^go: can only use path@version syntax with ''go get'' and ''go install'' in module-aware mode$'
5 ! go build rsc.io/quote@v1.5.1
6 stderr '^package rsc.io/quote@v1.5.1: can only use path@version syntax with ''go get'' and ''go install'' in module-aware mode$'
7
8 env GO111MODULE=on
9 cd x
10 ! go build rsc.io/quote@v1.5.1
11 stderr '^package rsc.io/quote@v1.5.1: can only use path@version syntax with ''go get'' and ''go install'' in module-aware mode$'
12
13 -- x/go.mod --
14 module x
15
View as plain text