mirror of
https://github.com/anchore/syft.git
synced 2026-11-04 16:36:40 +01:00
add tests around MatchNamedCaptureGroups + rename
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
@@ -77,7 +77,7 @@ func parseGemSpecEntries(_ string, reader io.Reader) ([]pkg.Package, error) {
|
||||
}
|
||||
|
||||
for field, pattern := range patterns {
|
||||
matchMap := internal.MatchCaptureGroups(pattern, sanitizedLine)
|
||||
matchMap := internal.MatchNamedCaptureGroups(pattern, sanitizedLine)
|
||||
if value := matchMap[field]; value != "" {
|
||||
if postProcessor := postProcessors[field]; postProcessor != nil {
|
||||
fields[field] = postProcessor(value)
|
||||
|
||||
Reference in New Issue
Block a user