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
Problem with import path for go-resty and go1.11 modules #1063
Comments
As a temporary workaround, I am running
|
The file is indeed generated by swagger but we have to revert it because the underlying code template does not support certain features we needed before. Open to change the import path as long as it doesn't break stuff. |
@laibulle this is also exactly what I have done to workaround the problem. This is why I know the fix works. @aeneasr If this file is indeed generated, maybe I should check with swagger-codegen then, we dont want to manually edit a file now and have the same problem appear later when we finally use the generated version. |
We're manually updating it anyways because of a patch I had to add. So it's fine to hotfix this as a new commit. swagger-codegen is kinda f*ed anyways because they introduced a new version 2.4 (we're on 2.2 I think) which has a completely different template which is even worse than the one right now. version 3.0 is in rc I think but there are no templates yet, so even if you make a PR or issue it's unlikely that it will be fixed. |
This is resolved |
@pierredavidbelanger , need your help. error on loading resty package with go modules. when i use go mod tidy or go build . it's not succeed. |
@lanshipeng I am sorry, I did not contributed to this project lately, you should try the chat and see with them if you should open a new issue for this. But , as a workaround, try to not let go choose the version for you (it will maybe not choose the right one), and target a specific version instead, one that we know this bug is fixed in. for example, this is the last commit in the master branch:
|
Still having the issue on brand new project. Bellow the steps:
then in main.go:
then
|
Pin Hydra to a specific version:
|
@pierredavidbelanger It solver the problem, and it should work properly in the build scripts without go get ... |
Not working after new release:
|
That's a diffrerent issue. You must use |
Hm, seems like go mod has issues with resolving tags like |
This should be fixed now that we're no longer using swagger-codegen but go-swagger |
In a toy project, I am trying to use the Hydra Go SDK.
I am using
go1.11
with the new modules feature.I am facing a problem when building because Go expect the lib
github.com/go-resty/resty
to be imported using the packagegopkg.in/resty.v1
(see itsgo-mod
'smodule
instruction):And the root cause of this, is this line here where you import
github.com/go-resty/resty
.I see that this file seems NOT to be generated by swagger-codegen ?
Can I just send a PR to use the right import path for go-resty in api_client.go ?
The text was updated successfully, but these errors were encountered: