Skip to content

Commit

Permalink
fix: remove ioutil
Browse files Browse the repository at this point in the history
  • Loading branch information
VihasMakwana committed Jul 23, 2024
1 parent e842010 commit 0293645
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metricbeat/module/system/process_summary/process_summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package process_summary
import (
"errors"
"fmt"
"io/ioutil"
"os"
"runtime"
"strconv"
"strings"
Expand Down Expand Up @@ -108,7 +108,7 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error {
// threadStats returns a map of state counts for running threads on a system
func threadStats(sys resolve.Resolver) (mapstr.M, error) {
statPath := sys.ResolveHostFS("/proc/stat")
procData, err := ioutil.ReadFile(statPath)
procData, err := os.ReadFile(statPath)
if err != nil {
return nil, fmt.Errorf("error reading procfs file %s: %w", statPath, err)
}
Expand Down

0 comments on commit 0293645

Please sign in to comment.