khenaidoo | ac63710 | 2019-01-14 15:44:34 -0500 | [diff] [blame^] | 1 | package cbor |
2 | |||||
3 | type Encoder struct{} | ||||
4 | |||||
5 | // AppendKey adds a key (string) to the binary encoded log message | ||||
6 | func (e Encoder) AppendKey(dst []byte, key string) []byte { | ||||
7 | if len(dst) < 1 { | ||||
8 | dst = e.AppendBeginMarker(dst) | ||||
9 | } | ||||
10 | return e.AppendString(dst, key) | ||||
11 | } |