| 1 |
go list -m -versions fruit.com |
| 2 |
stdout 'v1.0.0 v1.1.0' |
| 3 |
|
| 4 |
go get -d [email protected] |
| 5 |
go get -d [email protected] |
| 6 |
|
| 7 |
# On Go 1.18 and later, this will error out if GOPATH is ${WORK}/gopath, |
| 8 |
# as that places GOMODCACHE inside the Go module and "mod tidy" walks it. |
| 9 |
# "mod tidy" then complains about invalid import paths such as |
| 10 |
# "mod/gopath/pkg/mod/[email protected]/fruit". |
| 11 |
# It's for that reason that we moved the default GOPATH to ${WORK}/.gopath. |
| 12 |
go mod tidy |
| 13 |
|
| 14 |
-- go.mod -- |
| 15 |
module mod |
| 16 |
|