Skip to content

Commit 998654e

Browse files
Bug with matcher variable
1 parent 60a4cde commit 998654e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎chapter2/sample/search/search.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ func Run(searchTerm string) {
3535
}
3636

3737
// Launch the goroutine to perform the search.
38-
go func(feed *Feed) {
38+
go func(matcher Matcher, feed *Feed) {
3939
Match(matcher, feed, searchTerm, results)
4040
waitGroup.Done()
41-
}(feed)
41+
}(matcher, feed)
4242
}
4343

44-
// Launch a groutine to monitor when all the work is done.
44+
// Launch a goroutine to monitor when all the work is done.
4545
go func() {
4646
// Wait for everything to be processed.
4747
waitGroup.Wait()

0 commit comments

Comments
 (0)