// ChunkWriteRequests chunks write requests into batches of 25 (the current maximum size in AWS)
ChunkWriteRequests chunks write requests into batches of 25 (the current maximum size in AWS)
// ChunkWriteRequests chunks write requests into batches of 25 ( the current maximum size in AWS )
func (c *Client) ChunkWriteRequests(requests []*dynamodb.WriteRequest) [][]*dynamodb.WriteRequest {
	chunkSize := 25
	results := make([][]*dynamodb.WriteRequest, 0, len(requests)/chunkSize)
	total := len(requests)
	for i := 0; i < total; i += chunkSize {
		end := i + chunkSize
		if end > total {
			end = total
		}
		results = append(results, requests[i:end])
	}
	return results
}
func ( c * Client ) ChunkWriteRequests ( requests [ ] * dynamodb . WriteRequest ) [ ] [ ] * dynamodb . WriteRequest { chunkSize := 25 results := make ( [ ] [ ] * dynamodb . WriteRequest , 0 , len ( requests ) / chunkSize ) total := len ( requests ) for i := 0 ; i < total ; i += chunkSize { end := i + chunkSize if end > total { end = total } results = append ( results , requests [ i : end ] ) } return results }
ChunkWriteRequests chunks write requests into batches of 25 (the current maximum size in AWS)
ChunkWriteRequests chunks write requests into batches of 25 ( the current maximum size in AWS )