Masterminds / semver

Work with Semantic Versions in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Functions to decrease version numbers

nikoksr opened this issue · comments

Problem:
In one of my projects I need an internal fallback version to the current version. This fallback version should be the direct minor or major predecessor of the current version. In my case I would need the possibility to reduce the number of the major or minor version.

Example:
Current version: v0.20.0
Fallback version: v0.19.0

Proposed solution:
We would need the exact opposite of the functions IncMajor, IncMinor, IncPatch (e.g. DecMajor, DecMinor, DecPatch) which would decrease the version numbers respectively.