-
Notifications
You must be signed in to change notification settings - Fork 96
Allow resources to specify meta using the new MarshalMeta interface #320
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
Conversation
|
Thank you for this PR. Could you please add a test for this as well then we can merge it. |
jsonapi/marshal.go
Outdated
| // want any meta. | ||
| type MarshalMeta interface { | ||
| MarshalIdentifier | ||
| GetMeta() Meta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should omit the "Get" from the getter (https://golang.org/doc/effective_go.html?#Getters). someStruct.Meta() would read just as nice :)
|
I added a basic test and updated the method as per @sharpner recommendation but now the travis-ci build/tests are failing it appears that "github.com/golang/lint/golint" has moved or am I missing something? |
|
Thanks! I opened a separate PR to check if it fixes your problem. ;) #321 |
|
thanks, can you rebase on master, then the travis tests should be running again |
…ributes Revert Inadvertent change to Relationship struct Added Basic test for New GetMeta Interface
|
Thanks for resolving the Travis-ci issue rebase on master should be good to go now. 😄 |
…anyminds#320) - Changed the Meta field to use json.RawMessage type to match which Attributes - Added Basic test for New GetMeta Interface
As per the jsonapi Resource Objects should be able to have "meta" member pointing to a "Meta Object"