1 env GO111MODULE=on
2 env GOPROXY=direct
3 env GOSUMDB=off
4 [!net:golang.org] skip
5 [!git] skip
6
7 # fetch commit hash reachable from refs/heads/* and refs/tags/* is OK
8 go 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
12 stderr 'unknown revision'
13 ! go list -m golang.org/x/time@v0.0.0-20170424233410-334d83c35137
14 stderr 'unknown revision'
15 ! go list -m golang.org/x/time@334d83c35137
16 stderr 'unknown revision'
17
18 -- go.mod --
19 module m
20
View as plain text