mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-07-19 01:40:46 +00:00
Debug on taxonomy extraction and CSV conversion
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user