mirror of https://github.com/golang/go.git
28 lines
663 B
Plaintext
28 lines
663 B
Plaintext
# 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.
|
|
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"
|