AppendUints8 encodes and inserts an array of uint8 values into the dst byte array.
(dst []byte, vals []uint8)
| 254 | |
| 255 | // AppendUints8 encodes and inserts an array of uint8 values into the dst byte array. |
| 256 | func (e Encoder) AppendUints8(dst []byte, vals []uint8) []byte { |
| 257 | major := majorTypeArray |
| 258 | l := len(vals) |
| 259 | if l == 0 { |
| 260 | return e.AppendArrayEnd(e.AppendArrayStart(dst)) |
| 261 | } |
| 262 | if l <= additionalMax { |
| 263 | lb := byte(l) |
| 264 | dst = append(dst, major|lb) |
| 265 | } else { |
| 266 | dst = appendCborTypePrefix(dst, major, uint64(l)) |
| 267 | } |
| 268 | for _, v := range vals { |
| 269 | dst = e.AppendUint8(dst, v) |
| 270 | } |
| 271 | return dst |
| 272 | } |
| 273 | |
| 274 | // AppendUint16 encodes and inserts a uint16 value into the dst byte array. |
| 275 | func (e Encoder) AppendUint16(dst []byte, val uint16) []byte { |
nothing calls this directly
no test coverage detected