From: Romain Baugue Date: Wed, 27 Mar 2019 09:13:38 +0000 (+0100) Subject: reflect: document that method sets are lexicographically sorted X-Git-Tag: go1.13beta1~810 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f33b67b870208071a737768a6165198ccf340ec0;p=gostls13.git 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 --- diff --git a/src/reflect/type.go b/src/reflect/type.go index 83e59014ed..7aafc505bd 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -54,6 +54,9 @@ type Type interface { // // For an interface type, the returned Method's Type field gives the // 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 // MethodByName returns the method with that name in the type's