]> Cypherpunks repositories - gostls13.git/commitdiff
reflect: remove out of date UTF-8 StructOf restriction
authorColin Cross <ccross@android.com>
Tue, 17 May 2016 20:09:11 +0000 (13:09 -0700)
committerDavid Crawshaw <crawshaw@golang.org>
Tue, 17 May 2016 21:15:46 +0000 (21:15 +0000)
The initial implementation of reflect.StructOf in
https://golang.org/cl/9251 had a limitation that field names had to be
ASCII, which was later lifted by https://golang.org/cl/21777.  Remove
the out-of-date documentation disallowing UTF-8 field names.

Updates: #5748
Updates: #15064

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

index 3bfff4a7cc6aa0ea8c391bdf0f17f613b576a481..dd7b797c048230842026236be67d1128d4e4620f 100644 (file)
@@ -2314,10 +2314,6 @@ 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 does not support creating structs with UTF-8 field names or
-// UTF-8 (embedded) type names.
-// This limitation may be lifted eventually.
 func StructOf(fields []StructField) Type {
        var (
                hash       = fnv1(0, []byte("struct {")...)