Parse converts an image tag into a structured data format\. It aims to to support the general case of tags which are "semver\-like" and/or stable and parseable by heuristics\. Image tags follow no formal specification and therefore this is a best\-effort implementation\. Examples of tags this function can parse are: "5"\, "5\.2"\, "v4"\, "v5\.3\.6"\, "4\-alpine"\, "v3\.2\.1\-debian"\.
### func \(Tag\) Equals
```go
func (t Tag) Equals(tag Tag) bool
```
Equals tests Tag equality
### func \(Tag\) IsCompatible
```go
func (t Tag) IsCompatible(tag Tag) bool
```
IsCompatible determines if two tags can be compared together
### func \(Tag\) IsGreaterThan
```go
func (t Tag) IsGreaterThan(tag Tag) bool
```
IsGreaterThan tests if a tag is greater than another\. There are some tag\-isms to take into account here\, shorter is bigger \(i\.e\. 2\.1 \> 2\.1\.1 == true\, 2 \> 2\.1 == true\)\.
### func \(Tag\) IsLessThan
```go
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\) String
```go
func (t Tag) String() string
```
String formats a Tag correctly in string representation
UpgradeDelta returns a TagDelta object which is the difference between an old and new tag It can contain negative numbers if comparing with an older tag\.
ParseDelta converts a tag difference in the format of X\, X\.Y or X\.Y\.Z where X\, Y\, Z are positive or negative integers or 0
### func \(TagDelta\) String
```go
func (t TagDelta) String() string
```
### func \(TagDelta\) UpgradeType
```go
func (d TagDelta) UpgradeType() 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