code: func (l *LogFile) rotateRoutine() {
  	go func() {
  		for {
  			if stats, err := os.Stat(l.Path()); err == nil {
  				if stats.Size() >= l.size {
  					l.Rotate()
  				}
  			}
  			time.Sleep(l.rate)
  		}
  	}()
  }
docs: // helper function which rotate the logfile when needed