diff options
author | Michael Fraenkel <michael.fraenkel@gmail.com> | 2019-02-27 15:27:42 -0500 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2019-03-25 16:31:40 +0000 |
commit | 88adc33827f1e01953a6a3f40d927a2b7efcce3e (patch) | |
tree | 407d623e5d34bcfddf601a9a2604d79356e80d3a /src/context | |
parent | 9a8979deb01fd43a660351aedff2c155f9fe5ff6 (diff) | |
download | go-88adc33827f1e01953a6a3f40d927a2b7efcce3e.tar.gz go-88adc33827f1e01953a6a3f40d927a2b7efcce3e.zip |
context: remove dependency on reflect
Make context depend on reflectlite instead of reflect in effort to
eventually make net no longer depend on unicode tables.
With this CL we're down to just:
net -> context -> fmt -> unicode tables
The next CL can remove context -> fmt.
Updates #30440
Change-Id: I7f5df15f975d9dc862c59aa8477c1cfd6ff4967e
Reviewed-on: https://go-review.googlesource.com/c/go/+/164239
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/context')
-rw-r--r-- | src/context/context.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/context/context.go b/src/context/context.go index 21a40d5947..36f83c7b5b 100644 --- a/src/context/context.go +++ b/src/context/context.go @@ -50,7 +50,7 @@ package context import ( "errors" "fmt" - "reflect" + "internal/reflectlite" "sync" "time" ) @@ -468,7 +468,7 @@ func WithValue(parent Context, key, val interface{}) Context { if key == nil { panic("nil key") } - if !reflect.TypeOf(key).Comparable() { + if !reflectlite.TypeOf(key).Comparable() { panic("key is not comparable") } return &valueCtx{parent, key, val} |