alexejk / go-xmlrpc

An XML-RPC Client for Go
https://alexejk.io/article/handling-xmlrpc-in-go/
MIT License
19 stars 7 forks source link

Handling of empty values #81

Closed alexejk closed 8 months ago

alexejk commented 8 months ago

Adding support in decoder to handle empty response values.

As per specification, <struct /> and <array /> are invalid, thus only handling cases below and mapping them to default values:

Value Default Value
<string/> ""
<int/>, <i4/> 0
<boolean/> false
<double/> 0.0
<dateTime.iso8601/> time.Time{}
<base64/> nil
<array><data/><array> nil

Fixes #80

codecov[bot] commented 8 months ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (8c0fd9a) 75.60% compared to head (6fd64e7) 77.52%.

Files Patch % Lines
decode.go 91.48% 3 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #81 +/- ## ========================================== + Coverage 75.60% 77.52% +1.92% ========================================== Files 7 7 Lines 541 565 +24 ========================================== + Hits 409 438 +29 + Misses 101 96 -5 Partials 31 31 ```

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

sonarcloud[bot] commented 8 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
87.1% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud