-
Notifications
You must be signed in to change notification settings - Fork 415
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
Mock generation with NATS leads to import errors (version: 2.7.5) #419
Comments
Note: having the same issue with mockery |
So there are a lot of places in the code that check if the import path has |
What was the intention of that logic? In what use case is a file given instead of a URL? EDIT: for whoever looks at this, it'd be the key question to have an answer to. Knowing which case it would break removing that logic or knowing how to differentiate the cases. |
I did not write the original implementation so I can't speak with authority, but the code works with this abstract notion of "paths" that can either be a URL or a file path. It determines which one it is using that logic above, so my guess is that logic is just broken for projects appended with |
I am using I don't provide a clean solution but I temporarily "fixed" this issue by using 2 //go:generate mockery --name=MyInterface
//go:generate sed -ri "s|nats \"github.com/nats-io/\"|nats \"github.com/nats-io/nats.go\"|" mocks/MyInterface.go |
As raised in the past, generating mocks with
"github.com/nats-io/nats.go"
creates import issues.See here: #249 (comment)
What creates the issue on the NATS side is related to their change of repo, see here: go-kit/kit#940 (comment)
The issue still up on 2.7.5, is the
-exclude
option still on the roadmap to have this fixed?Here is the import issue represented.
The text was updated successfully, but these errors were encountered: