feat(aa-log): improve the regex helper type.
This commit is contained in:
parent
84247e390c
commit
e3545cc3bb
4 changed files with 12 additions and 9 deletions
|
|
@ -51,9 +51,7 @@ func GetApparmorLogs(file io.Reader, profile string) []string {
|
|||
|
||||
// Clean & remove doublon in logs
|
||||
res = util.DecodeHexInString(res)
|
||||
for _, aa := range regCleanLogs {
|
||||
res = aa.Regex.ReplaceAllLiteralString(res, aa.Repl)
|
||||
}
|
||||
res = regCleanLogs.Replace(res)
|
||||
logs := strings.Split(res, "\n")
|
||||
return util.RemoveDuplicate(logs)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue