Skip to content

Proposal: Add version diff #96

@gdavison

Description

@gdavison

go-version currently supports comparing versions as a whole, e.g. 2.3.4 > 1.2.3. Sometimes we need to determine if the difference between versions is a major change, a minor change, etc.

Since Compare() supports an arbitrary number of components, the diff should as well.

Only the first diff is likely to be relevant, as in the diff of 2.3.4 vs 1.2.3, we care about the major version change, and the minor version changes are not meaningful.

I can work on this if this sounds good. We're going to be using a very pared-down version of this in the AWS Provider.

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