github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/mod_sumdb_cache.txt (about) 1 env GO111MODULE=on 2 env sumdb=$GOSUMDB 3 env proxy=$GOPROXY 4 env GOPROXY GONOPROXY GOSUMDB GONOSUMDB 5 6 # rejected proxy fails verification 7 cp go.mod.orig go.mod 8 rm go.sum 9 env GOPROXY=$proxy/sumdb-503 10 ! go get -d rsc.io/quote 11 stderr 503 12 13 # fetch through working proxy is OK 14 cp go.mod.orig go.mod 15 rm go.sum 16 env GOPROXY=$proxy 17 go get -d rsc.io/quote 18 19 # repeated fetch works entirely from cache, does not consult sumdb 20 cp go.mod.orig go.mod 21 rm go.sum 22 env GOPROXY=$proxy/sumdb-503 23 go get -d rsc.io/quote 24 rm go.sum 25 26 # fetch specific module can work without proxy, using cache or go.sum 27 cp go.mod.orig go.mod 28 rm go.sum 29 env GOPROXY=off 30 go get -d rsc.io/quote@v1.5.2 # using cache 31 rm $GOPATH/pkg/mod/cache/download/sumdb/localhost.localdev/sumdb/lookup/rsc.io/quote@v1.5.2 32 go get -d rsc.io/quote@v1.5.2 # using go.sum 33 34 # fetch fails once we lose access to both cache and go.sum 35 rm go.sum 36 env GOPROXY=$proxy/sumdb-504 37 ! go get -d rsc.io/quote@v1.5.2 38 stderr 504 39 40 # GOINSECURE does not bypass checksum lookup 41 env GOINSECURE=rsc.io 42 env GOPROXY=$proxy/sumdb-504 43 ! go get -d rsc.io/quote@v1.5.2 44 stderr 504 45 46 # but -insecure bypasses the checksum lookup entirely 47 env GOINSECURE= 48 go get -d -insecure rsc.io/quote@v1.5.2 49 50 # and then it is in go.sum again 51 go get -d rsc.io/quote@v1.5.2 52 53 -- go.mod.orig -- 54 module m