Closed ddvk closed 1 year ago
Thanks for opening this PR! Can you update the godoc comments to mention what that integer represents?
the godoc of the Encode method?
Yep, thanks.
cc @alovak
Can we fix and amend that typo? @ddvk
Patch coverage: 93.47
% and project coverage change: +0.01
:tada:
Comparison is base (
79404f0
) 73.18% compared to head (4c3426a
) 73.19%.:exclamation: Current head 4c3426a differs from pull request most recent head c55f697. Consider uploading reports for the commit c55f697 to get more accurate results
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@ddvk thanks for raising the issue and your contributions. You helped us to realize that there is an issue with field packing/unpacking. I'm closing this PR as the issue is going to be addressed by this PR: https://github.com/moov-io/iso8583/pull/227
sure, thanks a lot.
Here's is my proposition for fixing the bcd length encoding. This also fixes the variable encoding where an odd length was encoded with the next even number.
The problem I had with bcd is that there is no way to find out whether the length of original data was odd or even, that's why the
Encoder interface, Encode
return type change.I couldn't come up with a more elegant solution.