...

Text file src/cmd/go/testdata/script/mod_file_proxy.txt

Documentation: cmd/go/testdata/script

     1[short] skip
     2
     3# Allow (cached) downloads for -mod=readonly.
     4env GO111MODULE=on
     5env GOPATH=$WORK/gopath1
     6cd $WORK/x
     7go mod edit -fmt
     8go list -mod=readonly
     9env GOPROXY=file:///nonexist
    10go list
    11grep v1.5.1 $GOPATH/pkg/mod/cache/download/rsc.io/quote/@v/list
    12
    13# Use download cache as file:/// proxy.
    14env GOPATH=$WORK/gopath2
    15[GOOS:windows] env GOPROXY=file:///C:/nonexist
    16[!GOOS:windows] env GOPROXY=file:///nonexist
    17! go list
    18[GOOS:windows] env GOPROXY=file:///$WORK/gopath1/pkg/mod/cache/download
    19[!GOOS:windows] env GOPROXY=file://$WORK/gopath1/pkg/mod/cache/download
    20go list
    21grep v1.5.1 $GOPATH/pkg/mod/cache/download/rsc.io/quote/@v/list
    22
    23-- $WORK/x/go.mod --
    24module x
    25go 1.13
    26require rsc.io/quote v1.5.1
    27-- $WORK/x/x.go --
    28package x
    29import _ "rsc.io/quote"
    30-- $WORK/x/go.sum --
    31golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c h1:pvCbr/wm8HzDD3fVywevekufpn6tCGPY3spdHeZJEsw=
    32golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
    33rsc.io/quote v1.5.1 h1:ZE3OgnVGrhXtFkGw90HwW992ZRqcdli/33DLqEYsoxA=
    34rsc.io/quote v1.5.1/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0=
    35rsc.io/sampler v1.3.0 h1:HLGR/BgEtI3r0uymSP/nl2uPLsUnNJX8toRyhfpBTII=
    36rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

View as plain text