mirror of
				https://github.com/ClusterCockpit/cc-metric-collector.git
				synced 2025-11-04 02:35:07 +01:00 
			
		
		
		
	Replace ioutils with os and io (#87)
This commit is contained in:
		@@ -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(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user