code: func (m *Mock) GetAllMatching(reString string) []string {
  	var matches []string
  	w := m.w.(*mockWriter)
  	re := regexp.MustCompile(reString)
  	for _, logMsg := range <-w.getChan {
  		if re.MatchString(logMsg) {
  			matches = append(matches, logMsg)
  		}
  	}
  	return matches
  }
docs: // GetAllMatching returns all messages logged since instantiation or the last
  // Clear() whose text matches the given regexp. The regexp is
  // accepted as a string and compiled on the fly, because convenience
  // is more important than performance.
  //
  // The caller must not modify the elements of the returned slice.