Skip to content

Find subset within the constraints #256

@thelovekesh

Description

@thelovekesh

Let's assume the following scenario:

c1, _ := semver.NewConstraint(">=1.4.0")
c2, _ := semver.NewConstraint("^1")

res, _ := c2.Satisfies(c1)

With the current APIs, it seems that achieving this is not possible.

@mattfarina, if it’s feasible, could you please provide some guidance on whether this can be done with the existing package? I’m happy to contribute to this change if you can share how the package currently parses version ranges as I have very less idea about this.

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