make strings and byte slices encodable for convenience so they can be used as keys and/or values in kafka messages StringEncoder implements the Encoder interface for Go strings so that they can be used as the Key or Value in a ProducerMessage.
| 74 | // StringEncoder implements the Encoder interface for Go strings so that they can be used |
| 75 | // as the Key or Value in a ProducerMessage. |
| 76 | type StringEncoder string |
| 77 | |
| 78 | func (s StringEncoder) Encode() ([]byte, error) { |
| 79 | return []byte(s), nil |
no outgoing calls
no test coverage detected