code: func (l *LogReduction) ShouldMessageBePrinted(message string, parentID string) bool {
  	l.errorMapLock.Lock()
  	defer l.errorMapLock.Unlock()
  	l.cleanupErrorTimeouts()
  	lastMsg, ok := l.lastError[parentID]
  	lastPrinted, ok1 := l.errorPrinted[parentID]
  	if !ok || !ok1 || message != lastMsg || nowfunc().Sub(lastPrinted) >= l.identicalErrorDelay {
  		l.errorPrinted[parentID] = nowfunc()
  		l.lastError[parentID] = message
  		return true
  	}
  	return false
  }
docs: // ShouldMessageBePrinted determines whether a message should be printed based
  // on how long ago this particular message was last printed