@@ -50,13 +50,13 @@ type Type interface {
50
50
// It panics if i is not in the range [0, NumMethod()).
51
51
//
52
52
// For a non-interface type T or *T, the returned Method's Type and Func
53
- // fields describe a function whose first argument is the receiver.
53
+ // fields describe a function whose first argument is the receiver,
54
+ // and only exported methods are accessible.
54
55
//
55
56
// For an interface type, the returned Method's Type field gives the
56
57
// method signature, without a receiver, and the Func field is nil.
57
58
//
58
- // Only exported methods are accessible and they are sorted in
59
- // lexicographic order.
59
+ // Methods are sorted in lexicographic order.
60
60
Method (int ) Method
61
61
62
62
// MethodByName returns the method with that name in the type's
@@ -69,7 +69,9 @@ type Type interface {
69
69
// method signature, without a receiver, and the Func field is nil.
70
70
MethodByName (string ) (Method , bool )
71
71
72
- // NumMethod returns the number of exported methods in the type's method set.
72
+ // NumMethod returns the number of methods accessible using Method.
73
+ //
74
+ // Note that NumMethod counts unexported methods only for interface types.
73
75
NumMethod () int
74
76
75
77
// Name returns the type's name within its package for a defined type.
0 commit comments