blob: 7f5bcad410c8f66f24ead3a806a51559b6cc299d [file] [log] [blame]
[short] skip
env GO111MODULE=on
# 'go get' outside a module with an executable prints a deprecation message.
go get example.com/cmd/a
stderr '^go get: installing executables with ''go get'' in module mode is deprecated.$'
stderr 'Use ''go install pkg@version'' instead.'
go mod init m
# 'go get' inside a module with a non-main package does not print a message.
# This will stop building in the future, but it's the command we want to use.
go get rsc.io/quote
! stderr deprecated
# 'go get' inside a module with an executable prints a different
# deprecation message.
go get example.com/cmd/a
stderr '^go get: installing executables with ''go get'' in module mode is deprecated.$'
stderr 'To adjust dependencies of the current module, use ''go get -d'''