Patch version comparison bug
alexey-igrychev opened this issue · comments
Aleksei Igrychev commented
The version with patch version prefix is lower than the same version without:
v1, _ := version.NewVersion("1.0.0-rc1")
v2, _ := version.NewVersion("1.0.0")
v1.LessThan(v2) // true
Aleksei Igrychev commented
This is not a bug, just semver logic
When major, minor, and patch are equal, a pre-release version has lower precedence than a normal version.