src/client/pkg/grpcutil/stream.go
func Chunk(data []byte, chunkSize int) [][]byte {
	var result [][]byte
	for i := 0; i < len(data); i += chunkSize {
		end := i + chunkSize
		if end > len(data) {
			end = len(data)
		}
		result = append(result, data[i:end])
	}
	return result
}
func Chunk(data []byte, chunkSize int) [][]byte {
	var result [][]byte
	for i := 0; i < len(data); i += chunkSize {
		end := i + chunkSize
		if end > len(data) {
			end = len(data)
		}
		result = append(result, data[i:end])
	}
	return result
}
func Chunk ( data [ ] byte , chunkSize int ) [ ] [ ] byte { var result [ ] [ ] byte for i := 0 ; i < len ( data ) ; i += chunkSize { end := i + chunkSize if end > len ( data ) { end = len ( data ) } result = append ( result , data [ i : end ] ) } return result }
// Chunk splits a piece of data up, this is useful for splitting up data that's
// bigger than MaxMsgSize
Chunk splits a piece of data up this is useful for splitting up data that s bigger than MaxMsgSize