mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 15:14:38 +00:00
buffer channel. (#1718)
This commit is contained in:
parent
66271aed7b
commit
c51e8f8af5
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ const (
|
||||||
|
|
||||||
// Chunker takes a chunk and splits it into chunks of ChunkSize.
|
// Chunker takes a chunk and splits it into chunks of ChunkSize.
|
||||||
func Chunker(originalChunk *Chunk) chan *Chunk {
|
func Chunker(originalChunk *Chunk) chan *Chunk {
|
||||||
chunkChan := make(chan *Chunk)
|
chunkChan := make(chan *Chunk, 1)
|
||||||
go func() {
|
go func() {
|
||||||
defer close(chunkChan)
|
defer close(chunkChan)
|
||||||
if len(originalChunk.Data) <= TotalChunkSize {
|
if len(originalChunk.Data) <= TotalChunkSize {
|
||||||
|
|
Loading…
Reference in a new issue