MCPcopy
hub / github.com/IBM/sarama / scanKafkaVersion

Function scanKafkaVersion

utils.go:337–343  ·  view source on GitHub ↗
(s string, pattern *regexp.Regexp, format string, v [3]*uint)

Source from the content-addressed store, hash-verified

335}
336
337func scanKafkaVersion(s string, pattern *regexp.Regexp, format string, v [3]*uint) error {
338 if !pattern.MatchString(s) {
339 return fmt.Errorf("invalid version `%s`", s)
340 }
341 _, err := fmt.Sscanf(s, format, v[0], v[1], v[2])
342 return err
343}
344
345func (v KafkaVersion) String() string {
346 if v.version[0] == 0 {

Callers 1

ParseKafkaVersionFunction · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected