-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find module for path github.com/influxdata/influxdb1-client/v2 #5
Comments
If you're creating a new module that depends on this repo, you can explicitly run
I'll need to circle back with the team to decide what to do about the /v2 name. We'll probably need to keep /v2 for compatibility, but maybe we can alias an existing package to avoid that in the future. (Based on golang/go#28435 (comment), the Go team's recommendation is that we rename the package.) |
Thank you, Mark. Indeed, the "v2" in the package name seems to confuse I'd also like to use this opportunity to thank you and your team for all the excellent work. Cheers! |
I believe what's confusing go guild is that the v2 in go modules syntax should be a release rather than it's own subtree in the source code? It might make sense to check this behaviour with the go team. |
I ended up just forking the repo and converting it to a go module: https://github.com/orourkedd/influxdb1-client My go.mod entry looks like this: And my import statement look like this: |
Works, thanks! |
This appears to be fixed if you use the solution presented in the README, added in fc22c7d. Just import like this: import (
_ "github.com/influxdata/influxdb1-client"
client "github.com/influxdata/influxdb1-client/v2"
) |
Trying to build a go module (using go 1.11) with the InfluxDB client imported throws an error. Here is a snippet to reproduce this:
Building without modules succeeds:
Trying to build a module fails:
Any tips? Thanks in advance!
The text was updated successfully, but these errors were encountered: