Skip to content

Leading zeros are explicitly forbidden in Semantic Versioning #86

@dimalinux

Description

@dimalinux

This call version.NewSemver("1.010.2") should return an error due to the leading zero on the minor version, but it does not. When you add a leading zero, it is not clear if the number is in octal or base 10.

The wording of the specification (https://semver.org/) is:

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. For instance: 1.9.0 -> 1.10.0 -> 1.11.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions