blob: 8de6d7dbb88ba514a08590a2845f39e81c5979b3 [file] [log] [blame]
# Allow (cached) downloads for -mod=readonly.
env GO111MODULE=on
env GOPATH=$WORK/gopath1
cd $WORK/x
go mod edit -fmt
go list -mod=readonly
env GOPROXY=file:///nonexist
go list
grep v1.5.1 $GOPATH/pkg/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
env GOPROXY=file://$WORK/gopath1/pkg/mod/cache/download
go list
grep v1.5.1 $GOPATH/pkg/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"