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

Add support for numeric delete-after values #164

Merged
merged 1 commit into from
Sep 24, 2020
Merged

Add support for numeric delete-after values #164

merged 1 commit into from
Sep 24, 2020

Conversation

mkuratczyk
Copy link
Collaborator

Delete-after can be a string (eg. "never") or an integer. RabbitMQ does
not accept string-formatted integers ("42") so this PR changes the type
of the DeleteAfter field and adds a custom marshaler/unmarshaler
to handle both cases. As you can see in the tests, this may be a
breaking change - since values of different types cannot be equal in Go,
when comparing DeleteAfter with a string, you now need to convert one of the
values. However, most operations should work without code changes.

Fixes #149

Delte-after can be a string (eg. "never") or an integer. RabbitMQ does
not accept string-formatted integers ("42") so this PR changes the type
of the `DeleteAfter` field and adds a custom marshaler/unmarshaler
to handle both cases. As you can see in the tests, this may be a
breaking change - since values of different types cannot be equal in Go,
when comparing `DeleteAfter` with a string, you now need to convert one of the
values. However, most operations should work without code changes.

Fixes #149
@michaelklishin michaelklishin merged commit 555e60e into michaelklishin:master Sep 24, 2020
@michaelklishin
Copy link
Owner

Thank you. Happy to do a minor version bump for this.

@michaelklishin michaelklishin added this to the 2.5.0 milestone Sep 28, 2020
@michaelklishin
Copy link
Owner

v2.5.0 is tagged.

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

Successfully merging this pull request may close these issues.

Shovel API: src-delete-after takes multiple types
2 participants