Skip to content
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

Possible bug when wrapping a struct with an ID #81

Closed
mfcochauxlaberge opened this issue Nov 26, 2019 · 2 comments
Closed

Possible bug when wrapping a struct with an ID #81

mfcochauxlaberge opened this issue Nov 26, 2019 · 2 comments
Labels

Comments

@mfcochauxlaberge
Copy link
Owner

res := jsonapi.Wrap(User{
	ID:       "u1",
	Username: "rob",
})

It seems like res.GetID() will return an empty string.

Investigate this more and fix if there is a bug. Also, does this also apply to pointers given to Wrap?

@mfcochauxlaberge
Copy link
Owner Author

It seems like this bug occurred because a struct instead of a pointer was passed.

@mfcochauxlaberge
Copy link
Owner Author

This is being handled by #83.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant