Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comments

refactor(proto)!: simplify proto.Version#532

Merged
muktihari merged 2 commits intomasterfrom
refactor/simplify-proto-version
Mar 12, 2025
Merged

refactor(proto)!: simplify proto.Version#532
muktihari merged 2 commits intomasterfrom
refactor/simplify-proto-version

Conversation

@muktihari
Copy link
Owner

The context of retrieving Major and Minor number of a Version is bound to the Version itself, so it's more make sense to have is as method instead of a public function. This way we don't bloat proto package with "unnecessary" function and constants.

We also don't have the proper context regarding which version is valid and which ones are not. The version may be updated faster than we can catch up with it, so now we trust the users to enter a valid version themself.

Removed items:

  • func proto.Validate
  • func proto.VersionMajor
  • func proto.VersionMinor
  • constants: ErrProtocolVersionNotSupported, MajorVersionShift, MajorVersionMask, MajorVersionShift, MinorVersionMask

Changed:

  • func CreateVersion now return one value (Version)

@muktihari muktihari added this to the v0.25.0 milestone Mar 12, 2025
@muktihari muktihari self-assigned this Mar 12, 2025
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (c176fd9) to head (d131768).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #532   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           42        42           
  Lines         4634      4611   -23     
=========================================
- Hits          4634      4611   -23     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@muktihari muktihari merged commit c21203a into master Mar 12, 2025
5 checks passed
@muktihari muktihari deleted the refactor/simplify-proto-version branch March 12, 2025 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants