github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/mod_list_pseudo.txt (about) 1 env GO111MODULE=on 2 3 # Regression test for golang.org/issue/32715. 4 5 # When using $GOPATH/pkg/mod/cache/download as a proxy, 6 # 'latest' queries should prefer tagged versions over pseudo-versions. 7 8 go mod download github.com/dmitshur-test/modtest5@v0.0.0-20190619020302-197a620e0c9a 9 go mod download github.com/dmitshur-test/modtest5@v0.5.0-alpha 10 go mod download github.com/dmitshur-test/modtest5@v0.5.0-alpha.0.20190619023908-3da23a9deb9e 11 cmp $GOPATH/pkg/mod/cache/download/github.com/dmitshur-test/modtest5/@v/list $WORK/modtest5.list 12 13 env GOPROXY=file:///$GOPATH/pkg/mod/cache/download 14 env GOPATH=$WORK/gopath2 15 mkdir $GOPATH 16 17 go list -m -json github.com/dmitshur-test/modtest5@latest 18 cmp stdout $WORK/modtest5.json 19 20 # If the module proxy contains only pseudo-versions, 'latest' should stat 21 # the version with the most recent timestamp — not the highest semantic 22 # version — and return its metadata. 23 env GOPROXY=file:///$WORK/tinyproxy 24 go list -m -json dmitri.shuralyov.com/test/modtest3@latest 25 cmp stdout $WORK/modtest3.json 26 27 -- $WORK/modtest5.list -- 28 v0.0.0-20190619020302-197a620e0c9a 29 v0.5.0-alpha 30 v0.5.0-alpha.0.20190619023908-3da23a9deb9e 31 -- $WORK/modtest5.json -- 32 { 33 "Path": "github.com/dmitshur-test/modtest5", 34 "Version": "v0.5.0-alpha", 35 "Time": "2019-06-18T19:04:46-07:00" 36 } 37 -- $WORK/tinyproxy/dmitri.shuralyov.com/test/modtest3/@v/list -- 38 v0.1.0-0.20161023043300-000000000000 39 v0.0.0-20181023043359-a85b471d5412 40 -- $WORK/tinyproxy/dmitri.shuralyov.com/test/modtest3/@v/v0.0.0-20181023043359-a85b471d5412.info -- 41 { 42 "Version": "v0.0.0-20181023043359-a85b471d5412", 43 "Time": "2018-10-22T21:33:59-07:00" 44 } 45 -- $WORK/modtest3.json -- 46 { 47 "Path": "dmitri.shuralyov.com/test/modtest3", 48 "Version": "v0.0.0-20181023043359-a85b471d5412", 49 "Time": "2018-10-22T21:33:59-07:00" 50 }