hashicorp / hashicorp/go-version
Proposal: Add version diff
Open
- 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
Assessment
This issue has not been assessed yet.