mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 20:03:10 -06:00
15 lines
294 B
Go
15 lines
294 B
Go
package common
|
|
|
|
import "gopkg.in/Shopify/sarama.v1"
|
|
|
|
func SaramaHeaders(headers []*sarama.RecordHeader) map[string][]byte {
|
|
result := make(map[string][]byte)
|
|
for _, header := range headers {
|
|
if header == nil {
|
|
continue
|
|
}
|
|
result[string(header.Key)] = header.Value
|
|
}
|
|
return result
|
|
}
|