Stop using deprecated functions

This commit is contained in:
Ingo Oppermann
2022-08-15 16:30:24 +03:00
parent 96d8d51a7d
commit dfc12ab9fb
18 changed files with 65 additions and 63 deletions

View File

@@ -5,7 +5,7 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"regexp"
"sync"
@@ -179,7 +179,7 @@ func (s *checker) check() error {
return fmt.Errorf("request failed: %s", http.StatusText(res.StatusCode))
}
body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
return fmt.Errorf("error reading response: %w", err)
}