Merge pull request #68238 from justinsb/update_reflect2_to_101

Update reflect2 to 1.0.1 (memory utilization fix)

Kubernetes-commit: a94ea824eb59e92188f166c302d7995ba9002667
This commit is contained in:
Kubernetes Publisher 2018-09-25 05:02:43 -07:00
commit 087039522d
6 changed files with 103 additions and 89 deletions

168
Godeps/Godeps.json generated
View File

@ -168,7 +168,7 @@
}, },
{ {
"ImportPath": "github.com/modern-go/reflect2", "ImportPath": "github.com/modern-go/reflect2",
"Rev": "05fbef0ca5da472bbf96c9322b84a53edc03c9fd" "Rev": "94122c33edd36123c84d5368cfb2b69df93a0ec8"
}, },
{ {
"ImportPath": "github.com/peterbourgon/diskv", "ImportPath": "github.com/peterbourgon/diskv",
@ -272,335 +272,335 @@
}, },
{ {
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1", "ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/admissionregistration/v1beta1", "ImportPath": "k8s.io/api/admissionregistration/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1", "ImportPath": "k8s.io/api/apps/v1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1beta1", "ImportPath": "k8s.io/api/apps/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1beta2", "ImportPath": "k8s.io/api/apps/v1beta2",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/authentication/v1", "ImportPath": "k8s.io/api/authentication/v1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/authentication/v1beta1", "ImportPath": "k8s.io/api/authentication/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/authorization/v1", "ImportPath": "k8s.io/api/authorization/v1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/authorization/v1beta1", "ImportPath": "k8s.io/api/authorization/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v1", "ImportPath": "k8s.io/api/autoscaling/v1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v2beta1", "ImportPath": "k8s.io/api/autoscaling/v2beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v2beta2", "ImportPath": "k8s.io/api/autoscaling/v2beta2",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v1", "ImportPath": "k8s.io/api/batch/v1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v1beta1", "ImportPath": "k8s.io/api/batch/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v2alpha1", "ImportPath": "k8s.io/api/batch/v2alpha1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/certificates/v1beta1", "ImportPath": "k8s.io/api/certificates/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/coordination/v1beta1", "ImportPath": "k8s.io/api/coordination/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/core/v1", "ImportPath": "k8s.io/api/core/v1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/events/v1beta1", "ImportPath": "k8s.io/api/events/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/extensions/v1beta1", "ImportPath": "k8s.io/api/extensions/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/imagepolicy/v1alpha1", "ImportPath": "k8s.io/api/imagepolicy/v1alpha1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/networking/v1", "ImportPath": "k8s.io/api/networking/v1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/policy/v1beta1", "ImportPath": "k8s.io/api/policy/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1", "ImportPath": "k8s.io/api/rbac/v1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1alpha1", "ImportPath": "k8s.io/api/rbac/v1alpha1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1beta1", "ImportPath": "k8s.io/api/rbac/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/scheduling/v1alpha1", "ImportPath": "k8s.io/api/scheduling/v1alpha1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/scheduling/v1beta1", "ImportPath": "k8s.io/api/scheduling/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/settings/v1alpha1", "ImportPath": "k8s.io/api/settings/v1alpha1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1", "ImportPath": "k8s.io/api/storage/v1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1alpha1", "ImportPath": "k8s.io/api/storage/v1alpha1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1beta1", "ImportPath": "k8s.io/api/storage/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "0d2438381651a1fe2816a9ac1923eeefa129e254"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting", "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip", "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/equality", "ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/errors", "ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/meta", "ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/resource", "ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion", "ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/fields", "ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/labels", "ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime", "ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/selection", "ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/types", "ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/cache", "ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/clock", "ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/diff", "ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/errors", "ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/framer", "ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream", "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy", "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr", "ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/json", "ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/naming", "ImportPath": "k8s.io/apimachinery/pkg/util/naming",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/net", "ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand", "ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime", "ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/sets", "ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation", "ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/wait", "ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml", "ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/version", "ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/watch", "ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "7619dea5b21b9d40430236f2d21ce583150d579c" "Rev": "b90fb3933738446b5a2196f37f3a8d24cbc5eb93"
}, },
{ {
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto", "ImportPath": "k8s.io/kube-openapi/pkg/util/proto",

View File

@ -6,6 +6,7 @@ go:
before_install: before_install:
- go get -t -v ./... - go get -t -v ./...
- go get -t -v github.com/modern-go/reflect2-tests/...
script: script:
- ./test.sh - ./test.sh

View File

@ -24,7 +24,7 @@
# go-tests = true # go-tests = true
# unused-packages = true # unused-packages = true
ignored = ["github.com/modern-go/test","github.com/modern-go/test/must","github.com/modern-go/test/should"] ignored = []
[[constraint]] [[constraint]]
name = "github.com/modern-go/concurrent" name = "github.com/modern-go/concurrent"

View File

@ -150,6 +150,9 @@ func (cfg *frozenConfig) TypeOf(obj interface{}) Type {
} }
func (cfg *frozenConfig) Type2(type1 reflect.Type) Type { func (cfg *frozenConfig) Type2(type1 reflect.Type) Type {
if type1 == nil {
return nil
}
cacheKey := uintptr(unpackEFace(type1).data) cacheKey := uintptr(unpackEFace(type1).data)
typeObj, found := cfg.cache.Load(cacheKey) typeObj, found := cfg.cache.Load(cacheKey)
if found { if found {

View File

@ -3,7 +3,7 @@
set -e set -e
echo "" > coverage.txt echo "" > coverage.txt
for d in $(go list ./... | grep -v vendor); do for d in $(go list github.com/modern-go/reflect2-tests/... | grep -v vendor); do
go test -coverprofile=profile.out -coverpkg=github.com/modern-go/reflect2 $d go test -coverprofile=profile.out -coverpkg=github.com/modern-go/reflect2 $d
if [ -f profile.out ]; then if [ -f profile.out ]; then
cat profile.out >> coverage.txt cat profile.out >> coverage.txt

View File

@ -4,6 +4,7 @@ import (
"reflect" "reflect"
"runtime" "runtime"
"strings" "strings"
"sync"
"unsafe" "unsafe"
) )
@ -15,10 +16,17 @@ func typelinks1() [][]unsafe.Pointer
//go:linkname typelinks2 reflect.typelinks //go:linkname typelinks2 reflect.typelinks
func typelinks2() (sections []unsafe.Pointer, offset [][]int32) func typelinks2() (sections []unsafe.Pointer, offset [][]int32)
var types = map[string]reflect.Type{} // initOnce guards initialization of types and packages
var packages = map[string]map[string]reflect.Type{} var initOnce sync.Once
var types map[string]reflect.Type
var packages map[string]map[string]reflect.Type
// discoverTypes initializes types and packages
func discoverTypes() {
types = make(map[string]reflect.Type)
packages = make(map[string]map[string]reflect.Type)
func init() {
ver := runtime.Version() ver := runtime.Version()
if ver == "go1.5" || strings.HasPrefix(ver, "go1.5.") { if ver == "go1.5" || strings.HasPrefix(ver, "go1.5.") {
loadGo15Types() loadGo15Types()
@ -90,11 +98,13 @@ type emptyInterface struct {
// TypeByName return the type by its name, just like Class.forName in java // TypeByName return the type by its name, just like Class.forName in java
func TypeByName(typeName string) Type { func TypeByName(typeName string) Type {
initOnce.Do(discoverTypes)
return Type2(types[typeName]) return Type2(types[typeName])
} }
// TypeByPackageName return the type by its package and name // TypeByPackageName return the type by its package and name
func TypeByPackageName(pkgPath string, name string) Type { func TypeByPackageName(pkgPath string, name string) Type {
initOnce.Do(discoverTypes)
pkgTypes := packages[pkgPath] pkgTypes := packages[pkgPath]
if pkgTypes == nil { if pkgTypes == nil {
return nil return nil