Fix intersect and similar for term entry page collections

Fixes #12254
This commit is contained in:
Bjørn Erik Pedersen
2024-03-15 13:12:25 +01:00
parent 57206e7274
commit b40f3c7df6
5 changed files with 69 additions and 5 deletions

View File

@@ -99,6 +99,14 @@ type Unwrapper interface {
Unwrapv() any
}
// Unwrap returns the underlying value of v if it implements Unwrapper, otherwise v is returned.
func Unwrapv(v any) any {
if u, ok := v.(Unwrapper); ok {
return u.Unwrapv()
}
return v
}
// LowHigh is typically used to represent a slice boundary.
type LowHigh struct {
Low int