AppendInts32 encodes and inserts an array of int32 values into the dst byte array.
(dst []byte, vals []int32)
| 170 | |
| 171 | // AppendInts32 encodes and inserts an array of int32 values into the dst byte array. |
| 172 | func (e Encoder) AppendInts32(dst []byte, vals []int32) []byte { |
| 173 | major := majorTypeArray |
| 174 | l := len(vals) |
| 175 | if l == 0 { |
| 176 | return e.AppendArrayEnd(e.AppendArrayStart(dst)) |
| 177 | } |
| 178 | if l <= additionalMax { |
| 179 | lb := byte(l) |
| 180 | dst = append(dst, major|lb) |
| 181 | } else { |
| 182 | dst = appendCborTypePrefix(dst, major, uint64(l)) |
| 183 | } |
| 184 | for _, v := range vals { |
| 185 | dst = e.AppendInt(dst, int(v)) |
| 186 | } |
| 187 | return dst |
| 188 | } |
| 189 | |
| 190 | // AppendInt64 encodes and inserts a int64 value into the dst byte array. |
| 191 | func (Encoder) AppendInt64(dst []byte, val int64) []byte { |
nothing calls this directly
no test coverage detected