1
0

Match also as string

This commit is contained in:
dump_stack() 2023-04-05 18:01:04 +00:00
parent 72d51c0e1c
commit b98abe4a83
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -182,11 +182,11 @@ func matchDebImagePkg(container, mask string) (pkgs []string, err error) {
return return
} }
kernels := r.FindAll([]byte(output), -1) for _, pkg := range strings.Fields(output) {
for _, k := range kernels { if r.MatchString(pkg) || strings.Contains(pkg, mask) {
pkg := string(k)
pkgs = append(pkgs, pkg) pkgs = append(pkgs, pkg)
} }
}
return return
} }