Skip to content

NewConstraint method faulty behavior #185

@benjaminbear

Description

@benjaminbear

Used version: 3.1.1
When I try to create a constraint with NewConstraint method I get following returns:

good Example
c, cErr := semver.NewConstraint("12.3.4.1234")
c.String() = nil
cErr = "improper constraint: 12.3.4.1234"

faulty behavior
c, cErr := semver.NewConstraint("12.23.4.1234")
c.String() = "12.23.4 1234"
cErr = nil

or

c, cErr := semver.NewConstraint("12.3.34.1234")
c.String() = "12.3.34 1234"
cErr = nil


I would expect the same behavior as with "12.3.4.1234", means telling me its not a contraint..

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions