Replace ioutils with os and io (#87)

This commit is contained in:
Thomas Gruber
2022-10-09 17:03:38 +02:00
committed by GitHub
parent 8849824ba9
commit 0fbff00996
9 changed files with 30 additions and 32 deletions

View File

@@ -3,7 +3,7 @@ package collectors
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"strconv"
"strings"
"time"
@@ -72,7 +72,7 @@ func (m *LoadavgCollector) Read(interval time.Duration, output chan lp.CCMetric)
if !m.init {
return
}
buffer, err := ioutil.ReadFile(LOADAVGFILE)
buffer, err := os.ReadFile(LOADAVGFILE)
if err != nil {
if err != nil {
cclog.ComponentError(