docs: add IsUpgradeCompatible

This commit is contained in:
decentral1se 2021-11-03 06:22:01 +01:00
parent b3072cb5e2
commit 885b22f77d
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 9 additions and 0 deletions

View File

@ -26,6 +26,7 @@ Package tagcmp provides image tag comparison operations\.
- [func (t Tag) IsCompatible(tag Tag) bool](<#func-tag-iscompatible>)
- [func (t Tag) IsGreaterThan(tag Tag) bool](<#func-tag-isgreaterthan>)
- [func (t Tag) IsLessThan(tag Tag) bool](<#func-tag-islessthan>)
- [func (pin Tag) IsUpgradeCompatible(upTag Tag) bool](<#func-tag-isupgradecompatible>)
- [func (t Tag) String() string](<#func-tag-string>)
- [func (curTag Tag) UpgradeDelta(newTag Tag) (TagDelta, error)](<#func-tag-upgradedelta>)
- [type TagDelta](<#type-tagdelta>)
@ -181,6 +182,14 @@ func (t Tag) IsLessThan(tag Tag) bool
IsLessThan tests if a tag is less than another\. There are some tag\-isms to take into account here\, shorter is bigger \(i\.e\. 2\.1 \< 2\.1\.1 == false\, 2 \< 2\.1 == false\)\.
### func \(Tag\) IsUpgradeCompatible
```go
func (pin Tag) IsUpgradeCompatible(upTag Tag) bool
```
IsUpgradeCompatible chekcs if upTag is compatible with a pinned version tag\. I\.e\. pinning to 22\-fpm should return true if upTag is 22\.2\.0\-fpm but not 22\.2\.0\-alpine or 23\.0\.0\-fpm
### func \(Tag\) String
```go