()
| 194 | |
| 195 | func (sf StructField) Type() reflect.Type { return sf.typ } |
| 196 | func (sf StructField) Values() (vx, vy reflect.Value) { |
| 197 | if !sf.unexported { |
| 198 | return sf.vx, sf.vy // CanInterface reports true |
| 199 | } |
| 200 | |
| 201 | // Forcibly obtain read-write access to an unexported struct field. |
| 202 | if sf.mayForce { |
| 203 | vx = retrieveUnexportedField(sf.pvx, sf.field, sf.paddr) |
| 204 | vy = retrieveUnexportedField(sf.pvy, sf.field, sf.paddr) |
| 205 | return vx, vy // CanInterface reports true |
| 206 | } |
| 207 | return sf.vx, sf.vy // CanInterface reports false |
| 208 | } |
| 209 | func (sf StructField) String() string { return fmt.Sprintf(".%s", sf.name) } |
| 210 | |
| 211 | // Name is the field name. |
nothing calls this directly
no test coverage detected