mirror of
https://github.com/golang/go
synced 2024-11-21 23:54:40 -07:00
reflect: document that PkgPath and Name return
empty string for unnamed types. Fixes #249. R=r https://golang.org/cl/156052
This commit is contained in:
parent
849e6f99b8
commit
1dbd3c8d3d
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user