Skip to content

Commit 7e4d1a0

Browse files
reflect: document that value.NumMethod counts exported methods
Updates #17686 Fixes #20848 Change-Id: I35d58c7d1aa74d3e7867124070e27c787d444b04 Reviewed-on: https://go-review.googlesource.com/47210 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent d13d6b3 commit 7e4d1a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/reflect/value.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ func (v Value) Method(i int) Value {
11341134
return Value{v.typ, v.ptr, fl}
11351135
}
11361136

1137-
// NumMethod returns the number of methods in the value's method set.
1137+
// NumMethod returns the number of exported methods in the value's method set.
11381138
func (v Value) NumMethod() int {
11391139
if v.typ == nil {
11401140
panic(&ValueError{"reflect.Value.NumMethod", Invalid})

0 commit comments

Comments
 (0)