diff --git a/trino/integration_tls_test.go b/trino/integration_tls_test.go index ea32158..cf95c7d 100644 --- a/trino/integration_tls_test.go +++ b/trino/integration_tls_test.go @@ -21,7 +21,6 @@ import ( "crypto/tls" "database/sql" "io" - "io/ioutil" "net/http" "net/http/httptest" "net/url" @@ -131,7 +130,7 @@ func newReverseProxyHandler(serverURL *url.URL, cproxyURL chan string) http.Hand w.WriteHeader(resp.StatusCode) pr, pw := io.Pipe() go func() { - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { pw.CloseWithError(err) return diff --git a/trino/trino.go b/trino/trino.go index 85409c1..a33e50d 100644 --- a/trino/trino.go +++ b/trino/trino.go @@ -60,10 +60,10 @@ import ( "errors" "fmt" "io" - "io/ioutil" "math" "net/http" "net/url" + "os" "reflect" "sort" "strconv" @@ -326,7 +326,7 @@ func newConn(dsn string) (*Conn, error) { cert := []byte(query.Get(sslCertConfig)) if certPath := query.Get(sslCertPathConfig); certPath != "" { - cert, err = ioutil.ReadFile(certPath) + cert, err = os.ReadFile(certPath) if err != nil { return nil, fmt.Errorf("trino: Error loading SSL Cert File: %w", err) } @@ -575,7 +575,7 @@ func newErrQueryFailedFromResponse(resp *http.Response) *ErrQueryFailed { const maxBytes = 8 * 1024 defer resp.Body.Close() qf := &ErrQueryFailed{StatusCode: resp.StatusCode} - b, err := ioutil.ReadAll(io.LimitReader(resp.Body, maxBytes)) + b, err := io.ReadAll(io.LimitReader(resp.Body, maxBytes)) if err != nil { qf.Reason = err return qf