Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

muktihari
Copy link
Owner

@muktihari muktihari commented Sep 13, 2024

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.

@muktihari muktihari added bug Something isn't working enhancement New feature or request labels Sep 13, 2024
@muktihari muktihari added this to the v0.23.0 milestone Sep 13, 2024
@muktihari muktihari self-assigned this Sep 13, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

proto/value.go Dismissed Show dismissed Hide dismissed
@muktihari muktihari merged commit ef61bdb into master Sep 13, 2024
5 checks passed
@muktihari muktihari deleted the refactor/type-defined-bool-value branch September 13, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants