Skip to content

Commit c16260d

Browse files
Added logging to comparison
1 parent 1428042 commit c16260d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

utils/stix/expression/comparison/comparison.go

+1-6
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ func New() *Comparison {
4848
type Comparison struct{}
4949

5050
func (s *Comparison) Evaluate(expression string, vars cacao.Variables) (bool, error) {
51-
52-
//"condition": "__variable__:value == '10.0.0.0/8'"
53-
//"condition": "__ip__:value/__subnet__:value == '10.0.0.0/8'"
54-
//"condition": "__ip__:value = __another_ip__:value"
55-
//"expresion_type": "ipv4"
5651
parts := strings.Split(expression, " ")
5752
if len(parts) != 3 {
5853
err := errors.New("comparisons can only contain 3 parts as per STIX specification")
@@ -66,7 +61,7 @@ func (s *Comparison) Evaluate(expression string, vars cacao.Variables) (bool, er
6661

6762
parts[0] = vars.Interpolate(parts[0])
6863

69-
log.Trace(parts)
64+
log.Trace("the interpolated expression is: ", parts)
7065

7166
switch usedVariable.Type {
7267
case cacao.VariableTypeBool:

0 commit comments

Comments
 (0)