this will be useful when you want to upgrade an app and need to check what kind of upgrade it will be. The new function just returns a Tag object with Major, Minor and Patch set to the result of subtraction i.e.
this will be useful when you want to upgrade an app and need to check what kind of upgrade it will be. The new function just returns a `Tag` object with `Major`, `Minor` and `Patch` set to the result of subtraction i.e.
```
tagOne := Parse("3.1.5")
tagTwo := Parse("3.2.0")
diff, err := tagOne.UpgradeElement(tagTwo)
```
`diff` is a
```
Tag {
Major: "0",
Minor: "1",
Patch: "-5",
MissingMinor: false,
MissingMajor: false,
MissingPatch: false,
UsesV: false,
}
```
knoflook
changed title from feat: add Tag.UpgradeElement(newTag Tag) which returns a difference between two tags to add functions to simplify checking upgrade types2021-10-01 18:32:35 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
this will be useful when you want to upgrade an app and need to check what kind of upgrade it will be. The new function just returns a
Tagobject withMajor,MinorandPatchset to the result of subtraction i.e.diffis a05b56c0aadto721c863f44721c863f44toaa81b0306cfeat: add Tag.UpgradeElement(newTag Tag) which returns a difference between two tagsto add functions to simplify checking upgrade typesKilling it.