Fix shadowed var captured in goroutine.
authorTom Clegg <tom@tomclegg.ca>
Thu, 30 Jan 2020 07:03:22 +0000 (02:03 -0500)
committerTom Clegg <tom@tomclegg.ca>
Thu, 30 Jan 2020 07:03:22 +0000 (02:03 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>

gvcf2numpy.go

index 44c659407eb1a8180aabcd6558bdeb12986b8927..0e57e72a5e9495ab08b5158652bbd38ad0c4d92a 100644 (file)
@@ -171,6 +171,7 @@ func (cmd *gvcf2numpy) tileGVCFs(tilelib *tileLibrary, infiles []string) ([]tile
        todo := make(chan func() error, len(infiles)*2)
        var wg sync.WaitGroup
        for i, infile := range infiles {
+               i, infile := i, infile
                if strings.HasSuffix(infile, ".1.fasta") || strings.HasSuffix(infile, ".1.fasta.gz") {
                        todo <- func() (err error) {
                                log.Printf("%s starting", infile)