MCPcopy
hub / github.com/crowdsecurity/crowdsec / Run

Function Run

pkg/exprhelpers/debugger.go:440–449  ·  view source on GitHub ↗
(program *vm.Program, env any, logger *log.Entry, debug bool)

Source from the content-addressed store, hash-verified

438}
439
440func Run(program *vm.Program, env any, logger *log.Entry, debug bool) (any, error) {
441 if debug {
442 dbgInfo, ret, err := RunWithDebug(program, env, logger)
443 DisplayExprDebug(program, dbgInfo, logger, ret)
444
445 return ret, err
446 }
447
448 return expr.Run(program, env)
449}
450
451func cleanTextForDebug(text string) string {
452 text = strings.Join(strings.Fields(text), " ")

Callers 15

EvaluateProfileMethod · 0.92
CheckExprWLMethod · 0.92
processFilterMethod · 0.92
processGrokMethod · 0.92
ApplyMethod · 0.92
ApplyMethod · 0.92
AfterBucketPourMethod · 0.92
overflowEventSourcesFunction · 0.92
eventSourcesFunction · 0.92
OnBucketPourMethod · 0.92
OnBucketOverflowMethod · 0.92

Calls 3

RunWithDebugFunction · 0.85
DisplayExprDebugFunction · 0.85
RunMethod · 0.65

Tested by

no test coverage detected