Skip to content

fix(version): guarantee safe usage of zero-value Version - #324

Open
AdamMagued wants to merge 1 commit into
Masterminds:masterfrom
AdamMagued:fix-issue-264
Open

AdamMagued wants to merge 1 commit into
Masterminds:masterfrom
AdamMagued:fix-issue-264

Conversation

@AdamMagued

Copy link
Copy Markdown

Fixes #264

Summary

  • Defined zero-value Version as 0.0.0 across methods and comparisons.
  • Updated Original() to return 0.0.0 when called on an uninitialized Version.
  • Added unit tests covering zero-value Version across methods, comparisons, collections, and constraints.

Verified with go test and go vet in container sandbox.

Signed-off-by: AdamMagued <adamismailmageud@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is zero value of sermver.Version safely used?

1 participant