From 863a5c16e115564b1e8cfb48df54ba94d90c247d Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 13 Jan 2024 15:38:25 +0100 Subject: [PATCH] qbittorrent/exporter: Replace deprecated calls --- modules/qbittorrent/exporter/qbittorrent_exporter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/qbittorrent/exporter/qbittorrent_exporter.go b/modules/qbittorrent/exporter/qbittorrent_exporter.go index c964fbc..ec67ae5 100644 --- a/modules/qbittorrent/exporter/qbittorrent_exporter.go +++ b/modules/qbittorrent/exporter/qbittorrent_exporter.go @@ -7,7 +7,7 @@ package main import ( "context" "encoding/json" - "io/ioutil" + "io" "log" "net" "net/http" @@ -119,7 +119,7 @@ func (c ApiClient) doRequest(group string, method string, parameters url.Values) log.Println(err) return []byte{}, err } - bodyBytes, err := ioutil.ReadAll(res.Body) + bodyBytes, err := io.ReadAll(res.Body) if err != nil { return []byte{}, err }