feat(aa-log): use os.ReadFile instead of ioutil.ReadFile

This commit is contained in:
Alexandre Pujol 2023-04-25 23:23:09 +01:00
parent ba27ac1f12
commit c53049293b
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC

View File

@ -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
} }