0

When I do a go mod tidy. I got the following error:

go: github.com/stretchrcom/testify@v1.4.0: parsing go.mod: unexpected module path "github.com/stretchr/testify"
Luc DUZAN
  • 1,299
  • 10
  • 18

2 Answers2

0

This error is due a package referring to testify before it was moved to github.com/stretchr/testify.

The solution is to add the following line in your go.mod:

replace github.com/stretchrcom/testify v1.4.0 => github.com/stretchr/testify v1.4.0

Luc DUZAN
  • 1,299
  • 10
  • 18
0

If this is a direct dependency, then would suggest adding the correct dependency directly to your go.mod file i.e. github.com/stretchr/testify v1.4.0

Ankush Chadha
  • 224
  • 3
  • 4