Skip to content

Commit c1c612f

Browse files
committed
fix: change InvertOp type
1 parent 26eef3b commit c1c612f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dsl/op/invert.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,19 @@ import (
55
)
66

77
func init() {
8-
macroMap[string(InvertOp)] = &InvertOp
8+
s := invertOp("$invert")
9+
InvertOp = &s
10+
macroMap[string(*InvertOp)] = InvertOp
911
}
1012

1113
type invertOp string
1214

1315
// InvertOp is "$invert" operation
14-
var InvertOp invertOp = "$invert"
16+
var InvertOp *invertOp
1517

1618
// String returns "$invert"
1719
func (*invertOp) String() string {
18-
return string(InvertOp)
20+
return string(*InvertOp)
1921
}
2022

2123
// Execute executes "$invert" operation

0 commit comments

Comments
 (0)