Skip to content

Remove dependency on a deprecated package #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions client/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"reflect"
"strings"
Expand Down Expand Up @@ -553,7 +552,7 @@ func getAPIVersions(httpClient *http.Client, endpoint string) (*versions, error)
return nil, fmt.Errorf("%v is not accessible: expected %v response, got %v", endpoint, http.StatusOK, resp.StatusCode)
}

body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, fmt.Errorf("error while reading body of the response: %w", err)
}
Expand Down Expand Up @@ -582,7 +581,7 @@ func createResponseMismatchError(respBody io.ReadCloser) *internalError {
}

func readAPIErrorResponse(respBody io.ReadCloser) (*apiErrorResponse, error) {
body, err := ioutil.ReadAll(respBody)
body, err := io.ReadAll(respBody)
if err != nil {
return nil, fmt.Errorf("failed to read the response body: %w", err)
}
Expand Down Expand Up @@ -812,7 +811,7 @@ func (client *NginxClient) get(path string, data interface{}) error {
}
defer resp.Body.Close()

body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return fmt.Errorf("failed to read the response body: %w", err)
}
Expand Down