INNER CODE UNIT · Go
Add
expr-lang/expr · vm/runtime/helpers/main.go:269
func Add(a, b interface{}) interface{} {
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.Duration:
return x.Add(y)
}
case time.Duration:
switch y := b.(type) {
case time.Time:
return y.Add(x)
case time.Duration: