Skip to content

Commit f33b67b

Browse files
Romain Bauguerobpike
Romain Baugue
authored andcommitted
reflect: document that method sets are lexicographically sorted
Fixes #30688 Change-Id: I8b63feba4b18bc07a09f6fbfaa33c1b3326b40e6 Reviewed-on: https://go-review.googlesource.com/c/go/+/169597 Reviewed-by: Rob Pike <[email protected]>
1 parent ce17481 commit f33b67b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/reflect/type.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ type Type interface {
5454
//
5555
// For an interface type, the returned Method's Type field gives the
5656
// method signature, without a receiver, and the Func field is nil.
57+
//
58+
// Only exported methods are accessible and they are sorted in
59+
// lexicographic order.
5760
Method(int) Method
5861

5962
// MethodByName returns the method with that name in the type's

0 commit comments

Comments
 (0)