diff --git a/expr.go b/expr.go index 1bc8e82..e667261 100644 --- a/expr.go +++ b/expr.go @@ -63,6 +63,8 @@ func (t *Template) performOp(a, b reflect.Value, op ast.Operator) (any, error) { switch op.Value { case "==": return a.Equal(b), nil + case "!=": + return !a.Equal(b), nil case "&&": if a.Kind() != reflect.Bool || b.Kind() != reflect.Bool { return nil, ast.PosError(op, "logical operations may only be performed on boolean values")