INNER CODE UNIT · Go
LessOrEqual
expr-lang/expr · vm/runtime/helpers/main.go:225
func LessOrEqual(a, b interface{}) bool {
switch x := a.(type) {
{{ cases "<=" }}
case string:
switch y := b.(type) {
case string:
return x <= y
}
case time.Time:
switch y := b.(type) {
case time.Time:
return x.Before(y) || x.Equal(y)
}
case time.Duration:
switch y := b.(type) {
case time.Duration:
return x <= y
}