blob: 144d06a2e0b680d2fd5e1e3de7795b0c98b31898 [file] [log] [blame]
# Use download cache for -getmode=local.
env GO111MODULE=on
env GOPATH=$WORK/gopath1
cd $WORK/x
! go list -getmode=local
go list
go list -getmode=local
env GOPROXY=file:///nonexist
go list -getmode=local
grep v1.5.1 $GOPATH/src/mod/cache/download/rsc.io/quote/@v/list
# Use download cache as file:/// proxy.
[windows] stop # TODO: file://$WORK puts backslashes in the URL
env GOPATH=$WORK/gopath2
env GOPROXY=file:///nonexist
! go list -getmode=local
! go list
env GOPROXY=file://$WORK/gopath1/src/mod/cache/download
! go list -getmode=local
go list
grep v1.5.1 $GOPATH/src/mod/cache/download/rsc.io/quote/@v/list
-- $WORK/x/go.mod --
module x
require rsc.io/quote v1.5.1
-- $WORK/x/x.go --
package x
import _ "rsc.io/quote"