From 351043c2421840ecaea039cd16cfa50390f48226 Mon Sep 17 00:00:00 2001 From: Ian Unruh Date: Fri, 31 May 2024 00:04:17 -0600 Subject: [PATCH] Replace deprecated use of ioutil (#5) --- pkg/collect/collector_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/collect/collector_test.go b/pkg/collect/collector_test.go index dff1bb0..fb6f691 100644 --- a/pkg/collect/collector_test.go +++ b/pkg/collect/collector_test.go @@ -3,7 +3,7 @@ package collect import ( "encoding/json" "fmt" - "io/ioutil" + "os" "testing" "github.com/prometheus/client_golang/prometheus" @@ -57,7 +57,7 @@ func (c mockClient) Devices() ([]ambient.Device, error) { } func loadDevices() ([]ambient.Device, error) { - encoded, err := ioutil.ReadFile("testdata/devices.json") + encoded, err := os.ReadFile("testdata/devices.json") if err != nil { return nil, err }