Skip to content

Commit 9d36cac

Browse files
colincrosscrawshaw
authored andcommitted
reflect: remove out of date UTF-8 StructOf restriction
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 <[email protected]>
1 parent 1a3e4f0 commit 9d36cac

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/reflect/type.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,10 +2314,6 @@ type structTypeFixed32 struct {
23142314
// StructOf returns the struct type containing fields.
23152315
// The Offset and Index fields are ignored and computed as they would be
23162316
// by the compiler.
2317-
//
2318-
// StructOf does not support creating structs with UTF-8 field names or
2319-
// UTF-8 (embedded) type names.
2320-
// This limitation may be lifted eventually.
23212317
func StructOf(fields []StructField) Type {
23222318
var (
23232319
hash = fnv1(0, []byte("struct {")...)

0 commit comments

Comments
 (0)