Skip to content

Commit 278e69f

Browse files
Refactored call to print
1 parent 6f3fcd3 commit 278e69f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/chapter2/search/main.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func main() {
3232
select {
3333
case findResults := <-captureResults:
3434
for _, result := range findResults {
35-
display(result)
35+
display(&result)
3636
}
3737
}
3838
}
@@ -69,7 +69,7 @@ func find(searchTerm string, site feeds.Site, captureResults chan []rss.SearchRe
6969
}
7070

7171
// display logs the results of the serach to the console.
72-
func display(result rss.SearchResult) {
72+
func display(result *rss.SearchResult) {
7373
switch result.Field {
7474
case "Title":
7575
log.Printf("Title:\n%s\n\n", result.Document.Title)

0 commit comments

Comments
 (0)