Fix typo and more meaningful var name.

This commit is contained in:
Blallo 2019-01-09 16:55:58 +01:00
parent 9b6454bf1b
commit b488923394
No known key found for this signature in database
GPG key ID: 0CBE577C9B72DC3F

View file

@ -39,12 +39,12 @@ func (e *ExprValue) Set(value string) error {
return nil return nil
} }
// Validate answers the question wether to include a log line or not. // Validate answers the question whether to include a log line or not.
func (e *ExprValue) Validate(lineInput map[string]interface{}) bool { func (e *ExprValue) Validate(logLine map[string]interface{}) bool {
if e.node == nil { if e.node == nil {
return true return true
} }
line := translateMap(lineInput) line := translateMap(logLine)
context := datasource.NewContextSimpleNative(line) context := datasource.NewContextSimpleNative(line)
val, ok := vm.Eval(context, e.node) val, ok := vm.Eval(context, e.node)
if !ok || val == nil { // errors when evaluating if !ok || val == nil { // errors when evaluating