Skip to content

Commit

Permalink
Replace deprecated use of ioutil (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianunruh committed May 31, 2024
1 parent 2ec8d5a commit 351043c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/collect/collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package collect
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"testing"

"github.com/prometheus/client_golang/prometheus"
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 351043c

Please sign in to comment.