MCPcopy Create free account
hub / github.com/IBM/sarama / getInt64Array

Method getInt64Array

real_decoder.go:269–289  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

267}
268
269func (rd *realDecoder) getInt64Array() ([]int64, error) {
270 n, err := rd.getArrayLength()
271 if err != nil {
272 return nil, err
273 }
274 if n <= 0 {
275 return nil, nil
276 }
277
278 if rd.remaining()/8 < n {
279 rd.off = len(rd.raw)
280 return nil, ErrInsufficientData
281 }
282
283 ret := make([]int64, n)
284 for i := range ret {
285 ret[i] = int64(binary.BigEndian.Uint64(rd.raw[rd.off:]))
286 rd.off += 8
287 }
288 return ret, nil
289}
290
291func (rd *realDecoder) getStringArray() ([]string, error) {
292 n, err := rd.getArrayLength()

Callers

nothing calls this directly

Calls 2

getArrayLengthMethod · 0.95
remainingMethod · 0.95

Tested by

no test coverage detected