aboutsummaryrefslogtreecommitdiff
path: root/src/internal/reflectlite
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2019-02-27 20:08:36 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2019-03-27 02:37:56 +0000
commit724a86fcede55d0e80da4a779ef64a2eb5d235a8 (patch)
tree2e162222e9eb4eb604efd70f0627ba57868c12ce /src/internal/reflectlite
parentf2e51f00158c2dcdff37c573c24f798d1e63db31 (diff)
downloadgo-724a86fcede55d0e80da4a779ef64a2eb5d235a8.tar.xz
context: don't depend on fmt
So the net package doesn't indirectly depend on unicode tables. But we're still not quite there, because a new test added in this CL reveals that we still have a path to unicode via: deps_test.go:570: TODO(issue 30440): policy violation: net => sort => reflect => unicode Updates #30440 Change-Id: I710c2061dfbaa8e866c92e6c824bd8df35784165 Reviewed-on: https://go-review.googlesource.com/c/go/+/169080 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/internal/reflectlite')
-rw-r--r--src/internal/reflectlite/type.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/internal/reflectlite/type.go b/src/internal/reflectlite/type.go
index faecb8755d..3375464647 100644
--- a/src/internal/reflectlite/type.go
+++ b/src/internal/reflectlite/type.go
@@ -47,6 +47,13 @@ type Type interface {
// Comparable reports whether values of this type are comparable.
Comparable() bool
+ // String returns a string representation of the type.
+ // The string representation may use shortened package names
+ // (e.g., base64 instead of "encoding/base64") and is not
+ // guaranteed to be unique among types. To test for type identity,
+ // compare the Types directly.
+ String() string
+
// Elem returns a type's element type.
// It panics if the type's Kind is not Ptr.
Elem() Type