mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-06-24 09:41:00 +00:00
fix: correct duplicated typos in GVal function names
Corrects duplicated typos in the registered GVal function names, changing "which_maxwhichmax" and "which_minwhichmin" to "which_max" and "which_min". The underlying obiutils.WhichMax/WhichMin logic and its int-to-float64 index conversion remain unchanged.
This commit is contained in:
@@ -141,14 +141,14 @@ var OBILang = gval.NewLanguage(
|
||||
gval.Function("max", func(args ...interface{}) (interface{}, error) {
|
||||
return obiutils.Max(args[0])
|
||||
}),
|
||||
gval.Function("which_max", func(args ...interface{}) (interface{}, error) {
|
||||
gval.Function("whichmax", func(args ...interface{}) (interface{}, error) {
|
||||
result, err := obiutils.WhichMax(args[0])
|
||||
if idx, ok := result.(int); ok {
|
||||
return float64(idx), nil
|
||||
}
|
||||
return result, err
|
||||
}),
|
||||
gval.Function("which_min", func(args ...interface{}) (interface{}, error) {
|
||||
gval.Function("whichmin", func(args ...interface{}) (interface{}, error) {
|
||||
result, err := obiutils.WhichMin(args[0])
|
||||
if idx, ok := result.(int); ok {
|
||||
return float64(idx), nil
|
||||
|
||||
Reference in New Issue
Block a user