refactor: replace regexputil-go with standard library SubexpIndex

This commit is contained in:
Manuel Rüger
2026-03-29 13:50:53 +02:00
parent 7be2325340
commit 724066906c
3 changed files with 3 additions and 11 deletions

View File

@@ -10,7 +10,6 @@ import (
"github.com/kovetskiy/mark/v16/includes"
"github.com/reconquest/karma-go"
"github.com/reconquest/pkg/log"
"github.com/reconquest/regexputil-go"
"go.yaml.in/yaml/v3"
)
@@ -126,13 +125,9 @@ func ExtractMacros(
groups := reMacroDirective.FindStringSubmatch(string(spec))
var (
expr = regexputil.Subexp(reMacroDirective, groups, "expr")
template = regexputil.Subexp(
reMacroDirective,
groups,
"template",
)
config = regexputil.Subexp(reMacroDirective, groups, "config")
expr = groups[reMacroDirective.SubexpIndex("expr")]
template = groups[reMacroDirective.SubexpIndex("template")]
config = groups[reMacroDirective.SubexpIndex("config")]
)
var macro Macro