add min and max to the obitools expression language

This commit is contained in:
Eric Coissac
2025-05-13 16:03:03 +02:00
parent f1b9ac4a13
commit f9324dd8f4
4 changed files with 210 additions and 12 deletions

View File

@ -268,7 +268,11 @@ func (marker *Marker) CheckTagLength() error {
reverse_length[len(tags.Reverse)]++
}
maxfl, _ := obiutils.MaxMap(forward_length)
maxfl, _, err := obiutils.MaxMap(forward_length)
if err != nil {
return err
}
if len(forward_length) > 1 {
others := make([]int, 0)
@ -280,7 +284,11 @@ func (marker *Marker) CheckTagLength() error {
return fmt.Errorf("forward tag length %d is not the same for all the PCRs : %v", maxfl, others)
}
maxrl, _ := obiutils.MaxMap(reverse_length)
maxrl, _, err := obiutils.MaxMap(reverse_length)
if err != nil {
return err
}
if len(reverse_length) > 1 {
others := make([]int, 0)