MCPcopy Create free account
hub / github.com/chainreactors/spray / CompareWithExpr

Function CompareWithExpr

pkg/utils.go:409–420  ·  view source on GitHub ↗
(exp *vm.Program, params map[string]interface{})

Source from the content-addressed store, hash-verified

407}
408
409func CompareWithExpr(exp *vm.Program, params map[string]interface{}) bool {
410 res, err := expr.Run(exp, params)
411 if err != nil {
412 logs.Log.Warn(err.Error())
413 }
414
415 if res == true {
416 return true
417 } else {
418 return false
419 }
420}
421
422func MatchWithGlobs(u string, globs []string) bool {
423 for _, glob := range globs {

Callers 2

handleBaselineMethod · 0.92
HandlerMethod · 0.92

Calls 2

ErrorMethod · 0.80
RunMethod · 0.45

Tested by

no test coverage detected