-
Notifications
You must be signed in to change notification settings - Fork 7
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
Pointer return type is not supported for endpont generation #32
Comments
@flamedmg thanks for reporting this issue. Although generally services should probably return values instead of pointers, this is indeed a bug. I submitted a PR with a fix. Can you give that patch a try? I also added a test case based on your example, it seems to fix the issue. Thanks! |
Yes, it fixes the issue. Thank you! But i have different one. I will create an issue whenever i will have more info. |
Interesting, it works with type from the same module, but not works with imported
I'm getting the following error:
|
Also you mentioned that services should return values. Could you please suggest how to properly implement this:
If user is absent, NotFound error is returned and nil instead of user. If i replace *User to User - should i just return User{} ? |
That's right!
Can you please open a separate issue for that? |
Imaging service with this method:
During generation process i'm getting the following error:
Looks like
func Type(stmt *jen.Statement, t types.Type) jen.Code
function is missing case for the pointer typeThe text was updated successfully, but these errors were encountered: