Bumping k8s dependencies to 1.13

This commit is contained in:
Cheng Xing
2018-11-16 14:08:25 -08:00
parent 305407125c
commit b4c0b68ec7
8002 changed files with 884099 additions and 276228 deletions

View File

@@ -7,12 +7,24 @@
package playground
import (
"context"
"fmt"
"io"
"log"
"net/http"
)
func client(r *http.Request) *http.Client {
return http.DefaultClient
func post(ctx context.Context, url, contentType string, body io.Reader) (*http.Response, error) {
req, err := http.NewRequest("POST", url, body)
if err != nil {
return nil, fmt.Errorf("http.NewRequest: %v", err)
}
req.Header.Set("Content-Type", contentType)
return http.DefaultClient.Do(req.WithContext(ctx))
}
func contextFunc(_ *http.Request) context.Context {
return context.Background()
}
func report(r *http.Request, err error) {