github.com/zxy12/go_duplicate_112_new@v0.0.0-20200807091221-747231827200/src/cmd/go/testdata/script/mod_file_proxy.txt (about) 1 # Allow (cached) downloads for -mod=readonly. 2 env GO111MODULE=on 3 env GOPATH=$WORK/gopath1 4 cd $WORK/x 5 go mod edit -fmt 6 go list -mod=readonly 7 env GOPROXY=file:///nonexist 8 go list 9 grep v1.5.1 $GOPATH/pkg/mod/cache/download/rsc.io/quote/@v/list 10 11 # Use download cache as file:/// proxy. 12 [windows] stop # TODO: file://$WORK puts backslashes in the URL 13 env GOPATH=$WORK/gopath2 14 env GOPROXY=file:///nonexist 15 ! go list 16 env GOPROXY=file://$WORK/gopath1/pkg/mod/cache/download 17 go list 18 grep v1.5.1 $GOPATH/pkg/mod/cache/download/rsc.io/quote/@v/list 19 20 -- $WORK/x/go.mod -- 21 module x 22 require rsc.io/quote v1.5.1 23 -- $WORK/x/x.go -- 24 package x 25 import _ "rsc.io/quote"