refractor(aa-log): merge identical function together.
This commit is contained in:
parent
95c322d62a
commit
cd80a7d919
3 changed files with 30 additions and 54 deletions
|
|
@ -9,6 +9,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/roddhjav/apparmor.d/pkg/logs"
|
||||
"golang.org/x/exp/slices"
|
||||
|
|
@ -59,7 +60,7 @@ func aaLog(logger string, path string, profile string) error {
|
|||
}
|
||||
|
||||
if raw {
|
||||
fmt.Print(logs.Raw(file, profile))
|
||||
fmt.Print(strings.Join(logs.GetApparmorLogs(file, profile), "\n"))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue