github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/mod_query.txt (about) 1 env GO111MODULE=on 2 3 go list -m -versions rsc.io/quote 4 stdout '^rsc.io/quote v1.0.0 v1.1.0 v1.2.0 v1.2.1 v1.3.0 v1.4.0 v1.5.0 v1.5.1 v1.5.2 v1.5.3-pre1$' 5 6 # Latest rsc.io/quote should be v1.5.2, not v1.5.3-pre1. 7 go list -m rsc.io/quote@latest 8 stdout 'rsc.io/quote v1.5.2$' 9 10 # Same for rsc.io/quote@v1 and rsc.io/quote@v1.5 (with no patch version). 11 go list -m rsc.io/quote@v1 12 stdout 'rsc.io/quote v1.5.2$' 13 go list -m rsc.io/quote@v1.5 14 stdout 'rsc.io/quote v1.5.2$' 15 16 # We should fall back to prereleases if no release tags match... 17 go list -m rsc.io/quote@>v1.5.2 18 stdout 'rsc.io/quote v1.5.3-pre1$' 19 20 # ...but prefer release versions when given the option. 21 go list -m rsc.io/quote@<v1.5.4 22 stdout 'rsc.io/quote v1.5.2$' 23 24 ! go list -m rsc.io/quote@>v1.5.3 25 stderr 'go list -m: module rsc.io/quote: no matching versions for query ">v1.5.3"' 26 27 go list -m -e -f '{{.Error.Err}}' rsc.io/quote@>v1.5.3 28 stdout 'no matching versions for query ">v1.5.3"' 29 30 -- go.mod -- 31 module x 32 require rsc.io/quote v1.0.0