Masterminds / Masterminds/semver
Functions to decrease version numbers
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing IncMajor, IncMinor, and IncPatch functions and read how their version changes are tested. Add the corresponding decrease behavior for major, minor, and patch versions, then verify that the v0.20.0 example produces v0.19.0 and that the existing tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100