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

Method ipSeek

pkg/exprhelpers/debugger.go:425–438  ·  view source on GitHub ↗
(ip int)

Source from the content-addressed store, hash-verified

423}
424
425func (erp ExprRuntimeDebug) ipSeek(ip int) []string {
426 for i := range len(erp.Lines) {
427 parts := strings.Fields(erp.Lines[i])
428 if len(parts) == 0 {
429 continue
430 }
431
432 if parts[0] == strconv.Itoa(ip) {
433 return parts
434 }
435 }
436
437 return nil
438}
439
440func Run(program *vm.Program, env any, logger *log.Entry, debug bool) (any, error) {
441 if debug {

Callers 1

RunWithDebugFunction · 0.95

Calls 1

FieldsMethod · 0.45

Tested by

no test coverage detected