Closed alexejk closed 8 months ago
Issues
0 New issues
Measures
0 Security Hotspots
93.8% Coverage on New Code
0.0% Duplication on New Code
Attention: 2 lines
in your changes are missing coverage. Please review.
Comparison is base (
2830010
) 75.38% compared to head (abbf585
) 75.60%.
Files | Patch % | Lines |
---|---|---|
decode.go | 93.33% | 1 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
As has been mentioned in #77, in some cases an XML-RPC struct member names are not known at compile time. This makes definitions of response datatypes much more complicated or not always possible.
To workaround this,
StrDecoder
can now acceptmap[string]any
values alongsidestruct
values. In order to not over-complicate things a limitation on the map's key type to be astring
has been added.This new functionality should be backwards compatible as existing codebases could never use
map
datatypes for decoding, thus introducing additional flexibility to struct decoding won't cause any problems.Fixes #77