Implement string concatenation
This commit is contained in:
parent
82e81ec7f4
commit
9b15d2a7dd
2
expr.go
2
expr.go
@ -137,6 +137,8 @@ func (t *Template) performOp(a, b reflect.Value, op ast.Operator) (any, error) {
|
|||||||
return a.Uint() + b.Uint(), nil
|
return a.Uint() + b.Uint(), nil
|
||||||
case reflect.Float64, reflect.Float32:
|
case reflect.Float64, reflect.Float32:
|
||||||
return a.Float() + b.Float(), nil
|
return a.Float() + b.Float(), nil
|
||||||
|
case reflect.String:
|
||||||
|
return a.String() + b.String(), nil
|
||||||
}
|
}
|
||||||
case "-":
|
case "-":
|
||||||
switch a.Kind() {
|
switch a.Kind() {
|
||||||
|
Loading…
Reference in New Issue
Block a user