mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
reflection support for tag strings
R=rsc DELTA=86 (77 added, 0 deleted, 9 changed) OCL=18201 CL=18203
This commit is contained in:
parent
57804f1d2d
commit
12a3435869
4 changed files with 86 additions and 9 deletions
|
|
@ -609,7 +609,7 @@ func StructCreator(typ Type, addr Addr) Value {
|
|||
nfield := t.Len();
|
||||
v := &StructValueStruct{ CommonV{StructKind, typ, addr}, new([]Value, nfield) };
|
||||
for i := 0; i < nfield; i++ {
|
||||
name, ftype, offset := t.Field(i);
|
||||
name, ftype, str, offset := t.Field(i);
|
||||
v.field[i] = NewValueAddr(ftype, addr + offset);
|
||||
}
|
||||
v.typ = typ;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue