Debug on taxonomy extraction and CSV conversion

This commit is contained in:
Eric Coissac
2025-07-07 15:29:40 +02:00
parent 8d53d253d4
commit 43b285587e
6 changed files with 39 additions and 17 deletions

View File

@@ -28,21 +28,22 @@ func NewITaxon() *ITaxon {
// Iterator creates a new ITaxon iterator for the TaxonSet.
// It starts a goroutine to send Taxon instances from the set to the iterator's source channel.
func (set *TaxonSet) Iterator() *ITaxon {
i := NewITaxon()
return set.Sort().Iterator()
// i := NewITaxon()
go func() {
for _, t := range set.set {
taxon := &Taxon{
Taxonomy: set.taxonomy,
Metadata: nil,
Node: t,
}
i.Push(taxon)
}
close(i.source)
}()
// go func() {
// for _, t := range set.set {
// taxon := &Taxon{
// Taxonomy: set.taxonomy,
// Metadata: nil,
// Node: t,
// }
// i.Push(taxon)
// }
// close(i.source)
// }()
return i
// return i
}
// Iterator creates a new ITaxon iterator for the TaxonSlice.