mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
CHORE: Remove deprecated io/ioutil (#1699)
* Remove deprecated io/ioutil * fixup! * fixup!
This commit is contained in:
@@ -4,13 +4,13 @@ import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -251,7 +251,7 @@ func (api *hetznerProvider) request(endpoint string, method string, request inte
|
||||
|
||||
defer cleanupResponseBody()
|
||||
if !statusOK(resp.StatusCode) {
|
||||
data, _ := ioutil.ReadAll(resp.Body)
|
||||
data, _ := io.ReadAll(resp.Body)
|
||||
printer.Printf(string(data))
|
||||
return fmt.Errorf("bad status code from HETZNER: %d not 200", resp.StatusCode)
|
||||
}
|
||||
|
Reference in New Issue
Block a user