mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-15 07:54:17 +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"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -37,8 +36,7 @@ func GetJournalctlLogs(path string, useFile bool) (io.Reader, error) {
|
|||||||
var value string
|
var value string
|
||||||
|
|
||||||
if useFile {
|
if useFile {
|
||||||
// content, err := os.ReadFile(filepath.Clean(path))
|
content, err := os.ReadFile(filepath.Clean(path))
|
||||||
content, err := ioutil.ReadFile(filepath.Clean(path))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user