]> Cypherpunks repositories - gostls13.git/commitdiff
reflect: document that PkgPath and Name return
authorRuss Cox <rsc@golang.org>
Wed, 18 Nov 2009 00:03:14 +0000 (16:03 -0800)
committerRuss Cox <rsc@golang.org>
Wed, 18 Nov 2009 00:03:14 +0000 (16:03 -0800)
empty string for unnamed types.

Fixes #249.

R=r
https://golang.org/cl/156052

src/pkg/reflect/type.go

index 69bc7d4552c3817b2c7d82cf28b5c8e7ba8b4a16..faea24340e9436fc335ca98e99e5afa33aef106b 100644 (file)
@@ -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.