From: Sebastien Binet Date: Thu, 2 Jun 2016 07:25:30 +0000 (+0200) Subject: reflect: document StructOf embedded fields limitation X-Git-Tag: go1.7beta2~72 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=905ced0e6ae33dca7ae6aa984d50cb02287952b1;p=gostls13.git reflect: document StructOf embedded fields limitation 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 --- diff --git a/src/reflect/type.go b/src/reflect/type.go index 1dff74df62..c9e14707fa 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -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 {")...)