moov-io / iso8583

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

add missing int64 support for String field Unmarshal #303

Closed alovak closed 8 months ago

alovak commented 8 months ago

We forgot to handle the int64 type when we Unmarshal field. The following code returned the error unsupported reflect.Value type: int64:

    data := struct {
        MTI               string `index:"0"`
        TransactionAmount int64  `index:"4"`
    }
    err := msg.Unrashal(&data)
    // handle error
codecov-commenter commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6ecba23) 74.86% compared to head (6fe69f3) 74.98%.

:exclamation: Current head 6fe69f3 differs from pull request most recent head 54b929f. Consider uploading reports for the commit 54b929f to get more accurate results

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #303 +/- ## ========================================== + Coverage 74.86% 74.98% +0.12% ========================================== Files 44 44 Lines 2495 2495 ========================================== + Hits 1868 1871 +3 + Misses 411 407 -4 - Partials 216 217 +1 ```

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