...

Text file src/cmd/go/testdata/script/mod_versions.txt

Documentation: cmd/go/testdata/script

     1# Test rejection of pkg@version in GOPATH mode.
     2env GO111MODULE=off
     3! go get rsc.io/quote@v1.5.1
     4stderr '^go: modules disabled by GO111MODULE=off'
     5! go build rsc.io/quote@v1.5.1
     6stderr '^package rsc.io/quote@v1.5.1: can only use path@version syntax with ''go get'' and ''go install'' in module-aware mode$'
     7
     8env GO111MODULE=on
     9cd x
    10! go build rsc.io/quote@v1.5.1
    11stderr '^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 --
    14module x

View as plain text