]> Cypherpunks repositories - gostls13.git/commitdiff
reflect: document StructOf embedded fields limitation
authorSebastien Binet <seb.binet@gmail.com>
Thu, 2 Jun 2016 07:25:30 +0000 (09:25 +0200)
committerDavid Crawshaw <crawshaw@golang.org>
Thu, 2 Jun 2016 14:29:03 +0000 (14:29 +0000)
This CL documents that StructOf currently does not generate wrapper
methods for embedded fields.

Updates #15924

Change-Id: I932011b1491d68767709559f515f699c04ce70d4
Reviewed-on: https://go-review.googlesource.com/23681
Reviewed-by: David Crawshaw <crawshaw@golang.org>
src/reflect/type.go

index 1dff74df62a06fef6d5642c8a2acd8357ff0114b..c9e14707fa8ef7db97634bc466b7c32347896f10 100644 (file)
@@ -2351,6 +2351,9 @@ type structTypeFixed32 struct {
 // StructOf returns the struct type containing fields.
 // The Offset and Index fields are ignored and computed as they would be
 // by the compiler.
+//
+// StructOf currently does not generate wrapper methods for embedded fields.
+// This limitation may be lifted in a future version.
 func StructOf(fields []StructField) Type {
        var (
                hash       = fnv1(0, []byte("struct {")...)