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

check for the max length in BerTLV prefix #256

Closed alovak closed 11 months ago

alovak commented 11 months ago

In the spec I'm working with now, there is a max length for BerTLV fields.

Currently, we are ignoring the Length (max length) of the field spec for prefix.BerTLV. This PR changes the prefix a little bit:

This PR is a breaking change (potentially) if you use the prefix.BerTLV and set non-zero Length in the field spec.

codecov-commenter commented 11 months ago

Codecov Report

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

Comparison is base (026d31c) 73.43% compared to head (93bf5ae) 73.49%. Report is 1 commits behind head on master.

:exclamation: Current head 93bf5ae differs from pull request most recent head 105736b. Consider uploading reports for the commit 105736b 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 #256 +/- ## ========================================== + Coverage 73.43% 73.49% +0.05% ========================================== Files 43 43 Lines 2270 2290 +20 ========================================== + Hits 1667 1683 +16 - Misses 373 375 +2 - Partials 230 232 +2 ``` | [Files Changed](https://app.codecov.io/gh/moov-io/iso8583/pull/256?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/256?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/256?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: | | [prefix/bertlv.go](https://app.codecov.io/gh/moov-io/iso8583/pull/256?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io#diff-cHJlZml4L2JlcnRsdi5nbw==) | `87.87% <83.33%> (-4.13%)` | :arrow_down: | | [message.go](https://app.codecov.io/gh/moov-io/iso8583/pull/256?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.