cmd/go: dependency only used in test code can not be found #31992
Labels
FrozenDueToAge
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I use the latest version
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
testing code is this
go.mod file
fibonacci.go
do not import any modulefibonacci/fibonacci_test.go
importgithub.ghproxy.top/google/go-cmp
when i run
go test -v app/testing/fibonacci
, i got an error:when i run
go mod tidy
, the go-cmp dependency in go.mod disappearedWhat did you expect to see?
did i use go module in wrong way ? what can i do to resolve this problem?
What did you see instead?
The text was updated successfully, but these errors were encountered: