1
0
mirror of https://github.com/golang/go synced 2024-11-24 08:20:03 -07:00

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 <r@golang.org>
This commit is contained in:
Romain Baugue 2019-03-27 10:13:38 +01:00 committed by Rob Pike
parent ce17481b7a
commit f33b67b870

View File

@ -54,6 +54,9 @@ type Type interface {
// //
// For an interface type, the returned Method's Type field gives the // For an interface type, the returned Method's Type field gives the
// method signature, without a receiver, and the Func field is nil. // method signature, without a receiver, and the Func field is nil.
//
// Only exported methods are accessible and they are sorted in
// lexicographic order.
Method(int) Method Method(int) Method
// MethodByName returns the method with that name in the type's // MethodByName returns the method with that name in the type's