Skip to content
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

httputil: remove req_go112.go #50675

Merged
merged 1 commit into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion pkg/util/cloudinfo/cloudinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"context"
"encoding/json"
"io/ioutil"
"net/http"
"regexp"
"time"

Expand Down Expand Up @@ -165,7 +166,7 @@ func (cli *client) getAzureInstanceMetadata(
func (cli *client) getInstanceMetadata(
ctx context.Context, url string, headers []metadataReqHeader,
) ([]byte, error) {
req, err := httputil.NewRequestWithContext(ctx, "GET", url, nil)
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
if err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/util/httputil/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func Post(

// Get does like http.Client.Get but uses the provided context and obeys its cancellation.
func (c *Client) Get(ctx context.Context, url string) (resp *http.Response, err error) {
req, err := NewRequestWithContext(ctx, "GET", url, nil)
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
if err != nil {
return nil, err
}
Expand All @@ -74,7 +74,7 @@ func (c *Client) Get(ctx context.Context, url string) (resp *http.Response, err

// Head does like http.Client.Head but uses the provided context and obeys its cancellation.
func (c *Client) Head(ctx context.Context, url string) (resp *http.Response, err error) {
req, err := NewRequestWithContext(ctx, "HEAD", url, nil)
req, err := http.NewRequestWithContext(ctx, "HEAD", url, nil)
if err != nil {
return nil, err
}
Expand All @@ -85,7 +85,7 @@ func (c *Client) Head(ctx context.Context, url string) (resp *http.Response, err
func (c *Client) Post(
ctx context.Context, url, contentType string, body io.Reader,
) (resp *http.Response, err error) {
req, err := NewRequestWithContext(ctx, "POST", url, body)
req, err := http.NewRequestWithContext(ctx, "POST", url, body)
if err != nil {
return nil, err
}
Expand Down
34 changes: 0 additions & 34 deletions pkg/util/httputil/req_go112.go

This file was deleted.

27 changes: 0 additions & 27 deletions pkg/util/httputil/req_go113.go

This file was deleted.