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

Method Format

protocol/protocol.go:426–441  ·  view source on GitHub ↗
(w fmt.State, v rune)

Source from the content-addressed store, hash-verified

424}
425
426func (b Broker) Format(w fmt.State, v rune) {
427 switch v {
428 case 'd':
429 io.WriteString(w, itoa(b.ID))
430 case 's':
431 io.WriteString(w, b.String())
432 case 'v':
433 io.WriteString(w, itoa(b.ID))
434 io.WriteString(w, " ")
435 io.WriteString(w, b.String())
436 if b.Rack != "" {
437 io.WriteString(w, " ")
438 io.WriteString(w, b.Rack)
439 }
440 }
441}
442
443func itoa(i int32) string {
444 return strconv.Itoa(int(i))

Callers

nothing calls this directly

Calls 3

StringMethod · 0.95
itoaFunction · 0.85
WriteStringMethod · 0.45

Tested by

no test coverage detected