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

How to keep leading zero? #141

Open
KiddoV opened this issue Aug 6, 2024 · 1 comment
Open

How to keep leading zero? #141

KiddoV opened this issue Aug 6, 2024 · 1 comment

Comments

@KiddoV
Copy link

KiddoV commented Aug 6, 2024

For example I have a version 1.2.02.

version, _ := goVersion.NewVersion("1.2.02")

fmt.Print(version) // Got `1.2.2` instead of `1.2.02`

How do I keep the leading zero?

@chriskery
Copy link

A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers, and MUST NOT contain leading zeroes. X is the major version, Y is the minor version, and Z is the patch version. Each element MUST increase numerically.

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

No branches or pull requests

2 participants