(other kafkaVersion)
| 554 | type kafkaVersion []int |
| 555 | |
| 556 | func (kv kafkaVersion) satisfies(other kafkaVersion) bool { |
| 557 | var ov int |
| 558 | for index, v := range kv { |
| 559 | if len(other) <= index { |
| 560 | ov = 0 |
| 561 | } else { |
| 562 | ov = other[index] |
| 563 | } |
| 564 | |
| 565 | if v < ov { |
| 566 | return false |
| 567 | } else if v > ov { |
| 568 | return true |
| 569 | } |
| 570 | } |
| 571 | return true |
| 572 | } |
| 573 | |
| 574 | func parseKafkaVersion(version string) kafkaVersion { |
| 575 | numbers := strings.Split(version, ".") |
no outgoing calls
no test coverage detected