Replaced legacy ioutil usage

This commit is contained in:
Juan Font Alonso 2022-08-09 23:21:19 +02:00
parent 3a091896fb
commit 2d887046de
5 changed files with 11 additions and 16 deletions

View file

@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"io"
"io/ioutil"
"net/http"
"net/url"
"os"
@ -50,7 +49,7 @@ func loadDERPMapFromURL(addr url.URL) (*tailcfg.DERPMap, error) {
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}