]> Cypherpunks repositories - gostls13.git/commitdiff
reflect: explain StructField.Anonymous field as 'embedded'
authorRuss Cox <rsc@golang.org>
Sat, 2 Feb 2013 02:01:46 +0000 (21:01 -0500)
committerRuss Cox <rsc@golang.org>
Sat, 2 Feb 2013 02:01:46 +0000 (21:01 -0500)
The spec mostly uses the term embedded.
It's too late to change the field name but at least fix the docs.

Fixes #4514.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7235080

src/pkg/reflect/type.go

index 6c7571b28fdddb7fc7f7de33a9f5c3dd4750fe86..8c8b9385384032561b49520ddcd1a17402f8c259 100644 (file)
@@ -708,7 +708,7 @@ type StructField struct {
        Tag       StructTag // field tag string
        Offset    uintptr   // offset within struct, in bytes
        Index     []int     // index sequence for Type.FieldByIndex
-       Anonymous bool      // is an anonymous field
+       Anonymous bool      // is an embedded field
 }
 
 // A StructTag is the tag string in a struct field.