hashicorp / hashicorp/go-version

Proposal: Add version diff

Open
#96 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
1.8k
Forks
165
Avg merge
23h 42m
Merged PRs (30d)
2

Description

`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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.