field returns the current node's parent field value.
()
| 98 | |
| 99 | // field returns the current node's parent field value. |
| 100 | func (c *Cursor) field() reflect.Value { |
| 101 | return reflect.Indirect(reflect.ValueOf(c.parent)).FieldByName(c.name) |
| 102 | } |
| 103 | |
| 104 | // Replace replaces the current Node with n. |
| 105 | // The replacement node is not walked by Apply. |