matrix-handler/vendor/github.com/rs/zerolog/internal/cbor/base.go

11 lines
253 B
Go
Raw Permalink Normal View History

2021-02-04 07:25:16 +00:00
package cbor
type Encoder struct{}
// AppendKey adds a key (string) to the binary encoded log message
func (e Encoder) AppendKey(dst []byte, key string) []byte {
if len(dst) < 1 {
dst = e.AppendBeginMarker(dst)
}
return e.AppendString(dst, key)
}