aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-17 16:03:14 -0800
committerRuss Cox <rsc@golang.org>2009-11-17 16:03:14 -0800
commit1dbd3c8d3dee1ee31ae97686fd6b2c756e2f4855 (patch)
tree322339a7d7caf40cf1d722e7e427f301445a8f8c
parent849e6f99b85eca65e6b6c9bd96aa568b4a4905f9 (diff)
downloadgo-1dbd3c8d3dee1ee31ae97686fd6b2c756e2f4855.tar.gz
go-1dbd3c8d3dee1ee31ae97686fd6b2c756e2f4855.zip
reflect: document that PkgPath and Name return
empty string for unnamed types. Fixes #249. R=r https://golang.org/cl/156052
-rw-r--r--src/pkg/reflect/type.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/reflect/type.go b/src/pkg/reflect/type.go
index 69bc7d4552..faea24340e 100644
--- a/src/pkg/reflect/type.go
+++ b/src/pkg/reflect/type.go
@@ -252,9 +252,11 @@ type Method struct {
type Type interface {
// PkgPath returns the type's package path.
// The package path is a full package import path like "container/vector".
+ // PkgPath returns an empty string for unnamed types.
PkgPath() string;
// Name returns the type's name within its package.
+ // Name returns an empty string for unnamed types.
Name() string;
// String returns a string representation of the type.