github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/mod_gonoproxy.txt (about)

     1  env GO111MODULE=on
     2  env sumdb=$GOSUMDB
     3  env proxy=$GOPROXY
     4  env GOPRIVATE GOPROXY GONOPROXY GOSUMDB GONOSUMDB
     5  env dbname=localhost.localdev/sumdb
     6  
     7  # disagree with sumdb fails
     8  cp go.mod.orig go.mod
     9  env GOSUMDB=$sumdb' '$proxy/sumdb-wrong
    10  ! go get rsc.io/quote
    11  stderr 'SECURITY ERROR'
    12  
    13  # but GONOSUMDB bypasses sumdb, for rsc.io/quote, rsc.io/sampler, golang.org/x/text
    14  env GONOSUMDB='*/quote,*/*mple*,golang.org/x'
    15  go get rsc.io/quote
    16  rm go.sum
    17  env GOPRIVATE='*/quote,*/*mple*,golang.org/x'
    18  env GONOPROXY=none # that is, proxy all despite GOPRIVATE
    19  go get rsc.io/quote
    20  
    21  # and GONOPROXY bypasses proxy
    22  [!net] skip
    23  [!exec:git] skip
    24  env GOPRIVATE=none
    25  env GONOPROXY='*/fortune'
    26  ! go get rsc.io/fortune # does not exist in real world, only on test proxy
    27  stderr 'git ls-remote'
    28  
    29  env GOSUMDB=
    30  env GONOPROXY=
    31  env GOPRIVATE='*/x'
    32  go get golang.org/x/text
    33  go list -m all
    34  ! stdout 'text.*v0.0.0-2017' # should not have the version from the proxy
    35  
    36  -- go.mod.orig --
    37  module m