...
1env GO111MODULE=on
2env GOPROXY=direct
3env GOSUMDB=off
4[!net:golang.org] skip
5[!git] skip
6
7# fetch commit hash reachable from refs/heads/* and refs/tags/* is OK
8go list -m golang.org/x/time@8be79e1e0910c292df4e79c241bb7e8f7e725959 # on master branch
9
10# fetch other commit hash, even with a non-standard ref, is not OK
11! go list -m golang.org/x/time@334d83c35137ac2b376c1dc3e4c7733791855a3a # refs/changes/24/41624/3
12stderr 'unknown revision'
13! go list -m golang.org/x/time@v0.0.0-20170424233410-334d83c35137
14stderr 'unknown revision'
15! go list -m golang.org/x/time@334d83c35137
16stderr 'unknown revision'
17
18-- go.mod --
19module m
View as plain text