parent
f81a7c03b9
commit
44053d6bfb
12
tagcmp.go
12
tagcmp.go
|
@ -74,11 +74,7 @@ func (t Tag) IsGreaterThan(tag Tag) bool {
|
||||||
// take into account here, shorter is bigger (i.e. 2.1 < 2.1.1 == false, 2 <
|
// take into account here, shorter is bigger (i.e. 2.1 < 2.1.1 == false, 2 <
|
||||||
// 2.1 == false).
|
// 2.1 == false).
|
||||||
func (t Tag) IsLessThan(tag Tag) bool {
|
func (t Tag) IsLessThan(tag Tag) bool {
|
||||||
if t.IsGreaterThan(tag) {
|
return !t.IsGreaterThan(tag)
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Equals tests Tag equality
|
// Equals tests Tag equality
|
||||||
|
@ -106,11 +102,7 @@ func (t Tag) Equals(tag Tag) bool {
|
||||||
|
|
||||||
p1, _ := strconv.Atoi(t.Patch)
|
p1, _ := strconv.Atoi(t.Patch)
|
||||||
p2, _ := strconv.Atoi(tag.Patch)
|
p2, _ := strconv.Atoi(tag.Patch)
|
||||||
if p1 != p2 {
|
return p1 == p2
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// String formats a Tag correctly in string representation
|
// String formats a Tag correctly in string representation
|
||||||
|
|
Loading…
Reference in New Issue