muktihari / fit

A FIT SDK for decoding and encoding Garmin FIT files in Go supporting FIT Protocol V2.
BSD 3-Clause "New" or "Revised" License
42 stars 4 forks source link

refactor!: change primitive bool to typedef.Bool #425

Closed muktihari closed 2 months ago

muktihari commented 2 months ago

When using primitive bool we can only represent an exist value: true and false, and we can't represent invalid value for boolean that way. Since a boolean value is typically used for configuration settings, using false as an invalid value is incorrect. How can we indicate that the user may not have set the value or the value may only be set when used?. For this reason, implementing typedef.Bool to accommodate nullable/unset boolean value becomes necessary.

codecov-commenter commented 2 months ago

Codecov Report

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

Project coverage is 100.00%. Comparing base (50d2a35) to head (61e0f86).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #425 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 41 42 +1 Lines 3627 3674 +47 ========================================= + Hits 3627 3674 +47 ```

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