MCPcopy
hub / github.com/segmentio/kafka-go / splitHostPort

Function splitHostPort

dialer.go:449–456  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

447}
448
449func splitHostPort(s string) (host string, port string) {
450 host, port, _ = net.SplitHostPort(s)
451 if len(host) == 0 && len(port) == 0 {
452 host = s
453 port = "9092"
454 }
455 return
456}
457
458func splitHostPortNumber(s string) (host string, portNumber int, err error) {
459 host, port := splitHostPort(s)

Callers 4

canonicalAddressFunction · 0.85
splitHostPortNumberFunction · 0.85
lookupHostFunction · 0.85
connectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected