| 1 |
# Verify that goproxytest.Setup sets GOPROXY when .gomodproxy is present |
| 2 |
# and that the proxy actually serves modules. |
| 3 |
go env GOPROXY |
| 4 |
stdout ^http://.*/mod,file://.*$ |
| 5 |
|
| 6 |
go list -m -versions fruit.com |
| 7 |
stdout 'v1.0.0' |
| 8 |
|
| 9 |
go get -d [email protected] |
| 10 |
|
| 11 |
# The goproxytest package information should definitely be available |
| 12 |
# and cached. |
| 13 |
go get -d github.com/rogpeppe/go-internal/goproxytest |
| 14 |
|
| 15 |
-- go.mod -- |
| 16 |
module mod |
| 17 |
|
| 18 |
-- .gomodproxy/_enable_overlay -- |
| 19 |
We want to be able to use regular Go modules as well as test-related |
| 20 |
ones. The contents of this file are ignored; only |
| 21 |
its presence is necessary. |
| 22 |
-- .gomodproxy/fruit.com_v1.0.0/go.mod -- |
| 23 |
module fruit.com |
| 24 |
|
| 25 |
-- .gomodproxy/fruit.com_v1.0.0/fruit/fruit.go -- |
| 26 |
package fruit |
| 27 |
|
| 28 |
const Name = "Apple" |