diff options
author | Russ Cox <rsc@golang.org> | 2009-11-17 16:03:14 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-11-17 16:03:14 -0800 |
commit | 931a458f94eac8584057051f4b6d8b1b02b08bb3 (patch) | |
tree | 0f8c4a4dabd889573462060f3257c7adde494d13 | |
parent | d1774ac72f358cd5add7f71fba5ebba22ab760c7 (diff) | |
download | go-931a458f94eac8584057051f4b6d8b1b02b08bb3.tar.gz |
reflect: document that PkgPath and Name return
empty string for unnamed types.
Fixes issue 249.
R=r
http://codereview.appspot.com/156052
-rw-r--r-- | src/pkg/reflect/type.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/reflect/type.go b/src/pkg/reflect/type.go index 69bc7d455..faea24340 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. |