(activeApp core.App, ir *core.InternalRequest, optNext func(data any) error)
| 483 | } |
| 484 | |
| 485 | func prepareInternalAction(activeApp core.App, ir *core.InternalRequest, optNext func(data any) error) (HandleFunc, map[string]string, bool) { |
| 486 | full := strings.ToUpper(ir.Method) + " " + ir.URL |
| 487 | |
| 488 | for re, actionFactory := range ValidBatchActions { |
| 489 | params, ok := findNamedMatches(re, full) |
| 490 | if ok { |
| 491 | return actionFactory(activeApp, ir, params, optNext), params, true |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | return nil, nil, false |
| 496 | } |
| 497 | |
| 498 | func findNamedMatches(re *regexp.Regexp, str string) (map[string]string, bool) { |
| 499 | match := re.FindStringSubmatch(str) |
no test coverage detected
searching dependent graphs…