Update reflect2 to 1.0.1 (memory utilization fix)
Picking up https://github.com/modern-go/reflect2/pull/2 which lazy initializes a map of all types which we don't use in k8s, saving memory & initialization time.
This commit is contained in:

committed by
Justin Santa Barbara

parent
674401ace1
commit
970e4da4c6
3
vendor/github.com/modern-go/reflect2/reflect2.go
generated
vendored
3
vendor/github.com/modern-go/reflect2/reflect2.go
generated
vendored
@@ -150,6 +150,9 @@ func (cfg *frozenConfig) TypeOf(obj interface{}) Type {
|
||||
}
|
||||
|
||||
func (cfg *frozenConfig) Type2(type1 reflect.Type) Type {
|
||||
if type1 == nil {
|
||||
return nil
|
||||
}
|
||||
cacheKey := uintptr(unpackEFace(type1).data)
|
||||
typeObj, found := cfg.cache.Load(cacheKey)
|
||||
if found {
|
||||
|
Reference in New Issue
Block a user