moov-io / iso8583

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

Return error with invalid length #180

Closed mfdeveloper508 closed 2 years ago

mfdeveloper508 commented 2 years ago

removed packed check, update composite field

adamdecaf commented 2 years ago

I deleted an outdated CI config file. If you can rebase CI will get past the error from gitleaks.

codecov-commenter commented 2 years ago

Codecov Report

Merging #180 (e6549fc) into master (94bf9c7) will increase coverage by 0.27%. The diff coverage is 100.00%.

:exclamation: Current head e6549fc differs from pull request most recent head 4735ea4. Consider uploading reports for the commit 4735ea4 to get more accurate results

@@            Coverage Diff             @@
##           master     #180      +/-   ##
==========================================
+ Coverage   70.14%   70.41%   +0.27%     
==========================================
  Files          37       37              
  Lines        1785     1768      -17     
==========================================
- Hits         1252     1245       -7     
+ Misses        338      334       -4     
+ Partials      195      189       -6     
Impacted Files Coverage Δ
field/binary.go 55.26% <ø> (-1.15%) :arrow_down:
field/string.go 77.14% <ø> (-0.64%) :arrow_down:
field/track1.go 69.02% <ø> (+1.20%) :arrow_up:
field/track2.go 68.22% <ø> (+1.25%) :arrow_up:
field/track3.go 61.79% <ø> (+1.35%) :arrow_up:
field/composite.go 81.09% <100.00%> (+0.32%) :arrow_up:
field/numeric.go 81.57% <0.00%> (+2.63%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 94bf9c7...4735ea4. Read the comment docs.

alovak commented 2 years ago

@adamdecaf please, take a look.

@mfdeveloper508 did what we had to do: just removed the check. It packs and unpacks according to expectations:

I may miss some use-cases @Dakinola892 @cheukwing please review it as well.

I removed some unnecessary code and added some tests.

alovak commented 2 years ago

@louisheath I would be glad if you can check this change as well.