Skip to content

Commit

Permalink
reflect: document that value.NumMethod counts exported methods
Browse files Browse the repository at this point in the history
Updates #17686
Fixes #20848

Change-Id: I35d58c7d1aa74d3e7867124070e27c787d444b04
Reviewed-on: https://go-review.googlesource.com/47210
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
ianlancetaylor committed Jun 29, 2017
1 parent d13d6b3 commit 7e4d1a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reflect/value.go
Expand Up @@ -1134,7 +1134,7 @@ func (v Value) Method(i int) Value {
return Value{v.typ, v.ptr, fl}
}

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

0 comments on commit 7e4d1a0

Please sign in to comment.