moov-io / iso8583

A golang implementation to marshal and unmarshal iso8583 message.
https://moov.io
Apache License 2.0
304 stars 100 forks source link

Skip bitmap presence bits when pack and unpack message #255

Closed alovak closed 11 months ago

alovak commented 11 months ago

closes #254

This PR adds the IsBitmapPresenceBit method to the Bitmap, allowing us to ignore fields that have the same index as bits, which indicate the presence of the next bitmap. By using this method, we can skip these fields when packing and unpacking a message.

alovak commented 11 months ago

this PR does not fix the same issue for composites. I'll fix it as well.

codecov-commenter commented 11 months ago

Codecov Report

Patch coverage: 71.42% and project coverage change: +0.05% :tada:

Comparison is base (026d31c) 73.43% compared to head (5d4c821) 73.48%.

:exclamation: Current head 5d4c821 differs from pull request most recent head c324965. Consider uploading reports for the commit c324965 to get more accurate results

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #255 +/- ## ========================================== + Coverage 73.43% 73.48% +0.05% ========================================== Files 43 43 Lines 2270 2282 +12 ========================================== + Hits 1667 1677 +10 - Misses 373 374 +1 - Partials 230 231 +1 ``` | [Files Changed](https://app.codecov.io/gh/moov-io/iso8583/pull/255?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io) | Coverage Δ | | |---|---|---| | [field/composite.go](https://app.codecov.io/gh/moov-io/iso8583/pull/255?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io#diff-ZmllbGQvY29tcG9zaXRlLmdv) | `83.22% <60.00%> (ø)` | | | [field/bitmap.go](https://app.codecov.io/gh/moov-io/iso8583/pull/255?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io#diff-ZmllbGQvYml0bWFwLmdv) | `71.05% <75.00%> (+0.29%)` | :arrow_up: | | [message.go](https://app.codecov.io/gh/moov-io/iso8583/pull/255?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io#diff-bWVzc2FnZS5nbw==) | `71.30% <100.00%> (+0.52%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.