]> Cypherpunks repositories - gostls13.git/commitdiff
reflect: document that method sets are lexicographically sorted
authorRomain Baugue <romain.baugue@gmail.com>
Wed, 27 Mar 2019 09:13:38 +0000 (10:13 +0100)
committerRob Pike <r@golang.org>
Wed, 3 Apr 2019 19:00:48 +0000 (19:00 +0000)
Fixes #30688

Change-Id: I8b63feba4b18bc07a09f6fbfaa33c1b3326b40e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/169597
Reviewed-by: Rob Pike <r@golang.org>
src/reflect/type.go

index 83e59014edae09feb04177ff742ec31b69c3cd3b..7aafc505bd91bdca98315eec59c06f19d3eef23b 100644 (file)
@@ -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