+ if found := strings.Index(txt, pattern); found >= 0 {
+ // Report the entire line where the pattern
+ // was found.
+ txt = txt[strings.LastIndexByte(txt[:found], '\n')+1:]
+ if end := strings.IndexByte(txt, '\n'); end >= 0 {
+ txt = txt[:end]
+ }
+ s.ReportFunc(pattern, txt)