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

Experimental: simplify data structs #273

Closed alovak closed 5 months ago

alovak commented 10 months ago

The goal of this PR is to implement (now it's more like proof of concept) the proposal #277 to use go basic types in the data structs instead of *field.String, *field.Numeric, etc. like this:

    type authRequestData struct {
        MTI                  string `index:"0"`
        PrimaryAccountNumber string `index:"2"`
        ProcessingCode       int    `index:"3"`
    }
codecov-commenter commented 10 months ago

Codecov Report

Patch coverage: 46.07% and project coverage change: -1.10% :warning:

Comparison is base (b652df4) 73.70% compared to head (3d54372) 72.60%.

:exclamation: Current head 3d54372 differs from pull request most recent head 255001f. Consider uploading reports for the commit 255001f 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 #273 +/- ## ========================================== - Coverage 73.70% 72.60% -1.10% ========================================== Files 43 44 +1 Lines 2282 2351 +69 ========================================== + Hits 1682 1707 +25 - Misses 369 412 +43 - Partials 231 232 +1 ``` | [Files Changed](https://app.codecov.io/gh/moov-io/iso8583/pull/273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io) | Coverage Δ | | |---|---|---| | [field/numeric.go](https://app.codecov.io/gh/moov-io/iso8583/pull/273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io#diff-ZmllbGQvbnVtZXJpYy5nbw==) | `65.13% <10.00%> (-18.01%)` | :arrow_down: | | [field/string.go](https://app.codecov.io/gh/moov-io/iso8583/pull/273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io#diff-ZmllbGQvc3RyaW5nLmdv) | `70.96% <25.00%> (-12.17%)` | :arrow_down: | | [message.go](https://app.codecov.io/gh/moov-io/iso8583/pull/273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io#diff-bWVzc2FnZS5nbw==) | `72.85% <70.00%> (+0.90%)` | :arrow_up: | | [field\_tag.go](https://app.codecov.io/gh/moov-io/iso8583/pull/273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io#diff-ZmllbGRfdGFnLmdv) | `72.97% <72.97%> (ø)` | | | [field/composite.go](https://app.codecov.io/gh/moov-io/iso8583/pull/273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io#diff-ZmllbGQvY29tcG9zaXRlLmdv) | `82.01% <100.00%> (+0.13%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.

:loudspeaker: Have feedback on the report? Share it here.

alovak commented 5 months ago

this PR was a proof of concept. Now all ideas are implemented in the module.