Skip to content

Commit 2b85ee2

Browse files
Switched to using an unbuffered channel
1 parent 338f576 commit 2b85ee2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎chapter2/sample/search/search.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ func Run(searchTerm string) {
1616
log.Fatal(err)
1717
}
1818

19-
// Create a buffered channel to receive match results to display.
20-
results := make(chan *Result, len(feeds))
19+
// Create an unbuffered channel to receive match results to display.
20+
results := make(chan *Result)
2121

2222
// Setup a wait group so we can process all the feeds.
2323
var waitGroup sync.WaitGroup

0 commit comments

Comments
 (0)