diff --git a/pkg/temperature/ds18b20.go b/pkg/temperature/ds18b20.go index 6e8bfa4..b8822db 100644 --- a/pkg/temperature/ds18b20.go +++ b/pkg/temperature/ds18b20.go @@ -6,7 +6,6 @@ import ( "context" "errors" "fmt" - "io/ioutil" "log" "os" "path/filepath" @@ -225,7 +224,7 @@ func triggerBulkRead() error { } func pollBusState() (BulkReadBusState, error) { - b, err := ioutil.ReadFile("/sys/bus/w1/devices/w1_bus_master1/therm_bulk_read") + b, err := os.ReadFile("/sys/bus/w1/devices/w1_bus_master1/therm_bulk_read") if err != nil { return BulkReadIdle, err } @@ -241,7 +240,7 @@ func pollBusState() (BulkReadBusState, error) { // read returns the temperature of the specified sensor in millidegrees celcius. func read(sensor string) (int64, error) { path := filepath.Join("/sys/bus/w1/devices", sensor, "w1_slave") - data, err := ioutil.ReadFile(path) + data, err := os.ReadFile(path) if err != nil { return NaN, err }