Skip to content

Inconsistency with partial versions #146

Open

Description

@alecthomas

This prints true:

c, _ := semver.NewConstraint("2")
v, _ := semver.NewVersion("2.2.3")
fmt.Println(c.Check(v))

While this prints false:

c, _ := semver.NewConstraint("2.2")
v, _ := semver.NewVersion("2.2.3")
fmt.Println(c.Check(v))

Is that intentional? If not I can fire off a PR.

Activity

  1. mattfarina commented on Feb 13, 2020

    @mattfarina
    Member

    @alecthomas Thanks for catching this. You did find a bug.

  2. mattfarina commented on Feb 13, 2020

    @mattfarina
    Member

    Actually, what version of sermver are you using? In semver v3 I do not get the same result as you. See https://play.golang.org/p/DhG4bHORwf-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      ⌂ 换网址