mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 23:43:56 +01:00
feat(aa-log): use os.ReadFile instead of ioutil.ReadFile
This commit is contained in:
parent
ba27ac1f12
commit
c53049293b
@ -8,7 +8,6 @@ import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@ -37,8 +36,7 @@ func GetJournalctlLogs(path string, useFile bool) (io.Reader, error) {
|
||||
var value string
|
||||
|
||||
if useFile {
|
||||
// content, err := os.ReadFile(filepath.Clean(path))
|
||||
content, err := ioutil.ReadFile(filepath.Clean(path))
|
||||
content, err := os.ReadFile(filepath.Clean(path))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user