diff --git a/godoc.md b/godoc.md index ae64511..d61ff77 100644 --- a/godoc.md +++ b/godoc.md @@ -12,6 +12,7 @@ Package tagcmp provides image tag comparison operations\. - [Variables](<#variables>) - [func IsParsable(tag string) bool](<#func-isparsable>) +- [func UpgradeType(t Tag) int](<#func-upgradetype>) - [type ByTagAsc](<#type-bytagasc>) - [func (t ByTagAsc) Len() int](<#func-bytagasc-len>) - [func (t ByTagAsc) Less(i, j int) bool](<#func-bytagasc-less>) @@ -27,6 +28,7 @@ Package tagcmp provides image tag comparison operations\. - [func (t Tag) IsGreaterThan(tag Tag) bool](<#func-tag-isgreaterthan>) - [func (t Tag) IsLessThan(tag Tag) bool](<#func-tag-islessthan>) - [func (t Tag) String() string](<#func-tag-string>) + - [func (curTag Tag) UpgradeElement(newTag Tag) (Tag, error)](<#func-tag-upgradeelement>) ## Variables @@ -69,6 +71,14 @@ func IsParsable(tag string) bool IsParsable determines if a tag is supported by this library +## func UpgradeType + +```go +func UpgradeType(t Tag) int +``` + +UpgradeType takes exit from UpgradeElemene and returns a numeric representation of upgrade or downgrade 1/\-1: patch 2/\-2: minor 4/\-4: major 0: no change + ## type ByTagAsc ByTagAsc sorts tags in ascending order where the last element is the latest tag\. @@ -183,6 +193,14 @@ func (t Tag) String() string String formats a Tag correctly in string representation +### func \(Tag\) UpgradeElement + +```go +func (curTag Tag) UpgradeElement(newTag Tag) (Tag, error) +``` + +UpgradeElement returns a Tag object which is the difference between an old and new tag It can contain negative numbers if comparing with an older tag\. + Generated by [gomarkdoc]()