Merge pull request #60563 from hzxuzhonghu/replace-context

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Replace package "golang.org/x/net/context" with "context"

**What this PR does / why we need it**:
Replace package "golang.org/x/net/context" with "context"

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #60560

**Special notes for your reviewer**:
As of Go 1.7 this package(golang.org/x/net/context) is available in the standard library under the name context. see (https://godoc.org/golang.org/x/net/context)

It is almost machinery replace.

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 915798d229b7be076d8e53d6aa1573adabd470d2
This commit is contained in:
Kubernetes Publisher
2018-03-23 16:34:23 -07:00
5 changed files with 57 additions and 59 deletions

106
Godeps/Godeps.json generated
View File

@@ -364,215 +364,215 @@
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/equality", "ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/errors", "ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/meta", "ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/resource", "ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing", "ImportPath": "k8s.io/apimachinery/pkg/api/testing",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip", "ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion", "ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/fields", "ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/labels", "ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime", "ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/selection", "ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/types", "ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/cache", "ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/clock", "ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/diff", "ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/errors", "ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/framer", "ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream", "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy", "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr", "ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/json", "ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/net", "ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand", "ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime", "ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/sets", "ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation", "ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/wait", "ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml", "ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/version", "ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/watch", "ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "3aa1cc99b23ea45d95fd4e1a648f10cc41a491e1" "Rev": "b94e5e603d6eb10ccb65a504f538ca1ae4ef92df"
}, },
{ {
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto", "ImportPath": "k8s.io/kube-openapi/pkg/util/proto",

View File

@@ -18,6 +18,7 @@ package gcp
import ( import (
"bytes" "bytes"
"context"
"encoding/json" "encoding/json"
"fmt" "fmt"
"net/http" "net/http"
@@ -27,7 +28,6 @@ import (
"time" "time"
"github.com/golang/glog" "github.com/golang/glog"
"golang.org/x/net/context"
"golang.org/x/oauth2" "golang.org/x/oauth2"
"golang.org/x/oauth2/google" "golang.org/x/oauth2/google"
"k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/net"

View File

@@ -17,10 +17,9 @@ limitations under the License.
package cache package cache
import ( import (
"context"
"time" "time"
"golang.org/x/net/context"
"k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/fields"

View File

@@ -17,10 +17,9 @@ limitations under the License.
package pager package pager
import ( import (
"context"
"fmt" "fmt"
"golang.org/x/net/context"
"k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/api/meta"
metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"

View File

@@ -17,11 +17,11 @@ limitations under the License.
package pager package pager
import ( import (
"context"
"fmt" "fmt"
"reflect" "reflect"
"testing" "testing"
"golang.org/x/net/context"
"k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/errors"
metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"