add sort to strings

This commit is contained in:
2023-03-26 21:55:03 +01:00
parent 364afa630d
commit 144313708e
2 changed files with 78 additions and 0 deletions

View File

@@ -78,6 +78,10 @@ func compare(a, b any) (bool, error) {
return anyToBool(resp), nil
}
}
} else if x, ok := b.(byte); ok {
if y, ok := a.(byte); ok {
return y < x, nil
}
}
return false, fmt.Errorf("cannot compare %s to %s", typeof(a), typeof(b))
}