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

Only JSON messages supported #9

Closed
rubenv opened this issue May 7, 2024 · 1 comment · Fixed by #10
Closed

Only JSON messages supported #9

rubenv opened this issue May 7, 2024 · 1 comment · Fixed by #10
Labels
enhancement New feature or request

Comments

@rubenv
Copy link
Contributor

rubenv commented May 7, 2024

Currently marshalling to JSON is baked into the library.

Would you accept a PR where we allow overriding this so that other content types can be used?

@m3talux m3talux added the enhancement New feature or request label May 7, 2024
@m3talux
Copy link
Collaborator

m3talux commented May 7, 2024

Yes, absolutely! That was definitely in the pipe . The only complexity in adding dynamic content would be to find a way to do it without breaking the current method signature.

I've seen a couple of libraries use variadic functions: Foo(opts ...Option) and that would allow updating the existing publishing method without breaking current implementations. My only concern with that is the ability to add an infinite amount of options, while only the first one would be used.

I'm open to suggestions regarding this matter.

rubenv added a commit to rubenv/gorabbit that referenced this issue May 7, 2024
rubenv added a commit to rubenv/gorabbit that referenced this issue May 8, 2024
m3talux pushed a commit that referenced this issue May 9, 2024
* Allow configuring a custom marshaller

Fixes #9

* Add marshalling unit test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants