code: func (fc *FileContent) StartRegistration(ctx context.Context, wg *sync.WaitGroup, interval int, output chan *data.RegistrationItem) {
  	defer wg.Done()
  
  	err := fc.publish(output)
  	if err != nil {
  		fc.log.Errorf("Could not create registration data: %s", err)
  	}
  
  	for {
  		select {
  		case <-time.Tick(time.Duration(interval) * time.Second):
  			err = fc.publish(output)
  			if err != nil {
  				fc.log.Errorf("Could not create registration data: %s", err)
  			}
  
  		case <-ctx.Done():
  			return
  		}
  	}
  }
docs: // StartRegistration starts stats a publishing loop