From 9b15d2a7dd404e37ee19ac6a4fcd5ea8a255e402 Mon Sep 17 00:00:00 2001 From: Elara Musayelyan Date: Tue, 31 Oct 2023 15:49:00 -0700 Subject: [PATCH] Implement string concatenation --- expr.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/expr.go b/expr.go index 714628f..6d1ddec 100644 --- a/expr.go +++ b/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 case reflect.Float64, reflect.Float32: return a.Float() + b.Float(), nil + case reflect.String: + return a.String() + b.String(), nil } case "-": switch a.Kind() {