blob: f54742c5232253b6d4f44927fab010f5770d24a7 [file] [log] [blame]
# Populate go.sum.
go get -d
# 'go list -m -retracted' should load retractions, even if the version
# containing retractions has a different module path.
go list -m -retracted -f '{{with .Retracted}}retracted{{end}}'
# 'go list -m -u' should load retractions, too.
go list -m -u -f '{{with .Retracted}}retracted{{end}}'
# 'go get' should warn about the retracted version.
go get -d
stderr '^go: warning: retracted by module author: bad$'
# We can't upgrade, since this latest version has a different module path.
! go get -d
stderr 'module declares its path as:'
-- go.mod --
go 1.16
require v1.0.0-bad
-- use.go --
package use
import _ ""