Slide 34
Slide 34 text
// channel
files := make(chan *string, self.Option.Cap)
matches := make(chan *grep.Match, self.Option.Cap)
done := make(chan bool)
!
// find
find := find.Find{Files: files, Option: self.Option}
go find.Do(self.Root)
!
// grep
grep := grep.Grep{
Files: files,
Matches: matches,
Pattern: self.Pattern,
Option: self.Option}
go grep.Do()
!
// print
print := print.Print{
Done: done,
Matches: matches,
Pattern: self.Pattern,
Option: self.Option}
go print.Do()
!
<-done // block