diff --git a/src/api/services/ingestion.go b/src/api/services/ingestion.go index c00fff2..0547534 100644 --- a/src/api/services/ingestion.go +++ b/src/api/services/ingestion.go @@ -472,7 +472,7 @@ func (i *IngestionService) ProcessVcf( var rowWg sync.WaitGroup rowWg.Add(len(rowComponents)) - for rowIndex, rowComponent := range rowComponents { + for colIdx, colVal := range rowComponents { go func(h int, rc string, rwg *sync.WaitGroup) { defer rwg.Done() key := strings.ToLower(strings.TrimSpace(strings.Replace(headers[h], "#", "", -1))) @@ -603,7 +603,7 @@ func (i *IngestionService) ProcessVcf( }) tmpSamplesMutex.Unlock() } - }(rowIndex, rowComponent, &rowWg) + }(colIdx, colVal, &rowWg) } rowWg.Wait()