code: func subslice(data []byte, offset, length int64, err errors.Sink) []byte {
  	size := int64(len(data))
  	if size < offset || offset < 0 || length < 0 {
  		err.PushError(errors.ErrorCodef(errors.ErrorCodeInputOutOfBounds,
  			"subslice could not slice data of size %d at offset %d for length %d", size, offset, length))
  		return nil
  	}
  	if size < offset+length {
  		// Extract slice from offset to end padding to requested length
  		ret := make([]byte, length)
  		copy(ret, data[offset:])
  		return ret
  	}
  	return data[offset : offset+length]
  }
docs: // Returns a subslice from offset of length length and a bool
  // (true iff slice was possible). If the subslice
  // extends past the end of data it returns A COPY of the segment at the end of
  // data padded with zeroes on the right. If offset == len(data) it returns all
  // zeroes. if offset > len(data) it returns a false