testcontainers-go: "go get" failure parsing go.mod file

I have an implicit dependency on this project and when I run go get -u, I get this error:

go: github.com/testcontainers/testcontainer-go@v0.0.0-20190108154635-47c0da630f72: parsing go.mod: unexpected module path "github.com/testcontainers/testcontainers-go"

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 12
  • Comments: 17 (6 by maintainers)

Commits related to this issue

Most upvoted comments

As a temporary workaround you can do this:

in go.mod file:

replace github.com/testcontainers/testcontainer-go => github.com/testcontainers/testcontainers-go v0.0.0-20190108154635-47c0da630f72

It looks like go modules only like tag names with v prefix, so the current 0.0.1 tag does not work. The authors need to re-tag it with v0.0.1.

Thanks to @F21: https://github.com/golang/go/issues/26904#issuecomment-455077691

Thanks for the tips. It sounds like the only action item for the library author is to retag the release with v0.0.1 instead of 0.0.1, to work well with Go Modules.

@prologic I think the real problem is not about the tag, but other packages are still using this repo’s old name, the one without s

It looks like my problem came from hashicorp -> influxdb: https://github.com/influxdata/influxdb/issues/11199

Thanks @VoyTechnology I was just looking for that trick! @vangent sorry about this bad bc break, but changing the name to keep it consistent was kind of a requirement. I hope you will find the library good and you will give it a try! If the fix works and you are able to understand what project injects our library let me know we will submit a pr to fix it