in types.go [328:354]
func (c cfgSub) cpy(ctx context) value {
newC := cfgSub{
c: &Config{ctx: ctx, metadata: c.c.metadata},
}
dict := c.c.fields.dict()
arr := c.c.fields.array()
fields := &fields{}
for name, f := range dict {
ctx := f.Context()
v := f.cpy(context{field: ctx.field, parent: newC})
fields.set(name, v)
}
if arr != nil {
fields.a = make([]value, len(arr))
for i, f := range arr {
ctx := f.Context()
v := f.cpy(context{field: ctx.field, parent: newC})
fields.setAt(i, newC, v)
}
}
newC.c.fields = fields
return newC
}