IsAtLeast return true if and only if the version it is called on is greater than or equal to the version passed in: V1.IsAtLeast(V2) // false V2.IsAtLeast(V1) // true
(other KafkaVersion)
| 132 | // V1.IsAtLeast(V2) // false |
| 133 | // V2.IsAtLeast(V1) // true |
| 134 | func (v KafkaVersion) IsAtLeast(other KafkaVersion) bool { |
| 135 | for i := range v.version { |
| 136 | if v.version[i] > other.version[i] { |
| 137 | return true |
| 138 | } else if v.version[i] < other.version[i] { |
| 139 | return false |
| 140 | } |
| 141 | } |
| 142 | return true |
| 143 | } |
| 144 | |
| 145 | // Effective constants defining the supported kafka versions. |
| 146 | var ( |
no outgoing calls