Code reefactoring

This commit is contained in:
2022-01-14 16:10:19 +01:00
parent 45a1765a03
commit ff40222902
13 changed files with 68 additions and 92 deletions

View File

@@ -1,7 +1,6 @@
package obitax
import (
"errors"
"fmt"
)
@@ -14,7 +13,7 @@ func (taxon *TaxNode) Path() (*TaxonSlice, error) {
taxon = taxon.pparent
if taxon == nil {
return nil, errors.New(fmt.Sprint("Taxonomy must be reindexed"))
return nil, fmt.Errorf("Taxonomy must be reindexed")
}
path = append(path, taxon)