ppl: bubble up values, bug fixes (#2213)

This commit is contained in:
Caleb Doxsey 2021-05-18 14:01:36 -06:00 committed by GitHub
parent e138054cb9
commit bdccd4f785
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 218 additions and 118 deletions

View file

@ -36,7 +36,7 @@ func (c emailsCriterion) GenerateRule(_ string, data parser.Value) (*ast.Rule, [
switch data.(type) {
case parser.String:
r.Body = append(r.Body, ast.MustParseExpr(`email = rule_data`))
r.Body = append(r.Body, ast.MustParseExpr(`email == rule_data`))
default:
return nil, nil, fmt.Errorf("unsupported value type: %T", data)
}