PathStep is a union-type for specific operations to traverse a value's tree structure. Users of this package never need to implement these types as values of this type will be returned by this package. Implementations of this interface: - [StructField] - [SliceIndex] - [MapIndex] - [Indirect] - [Ty
| 37 | // - [TypeAssertion] |
| 38 | // - [Transform] |
| 39 | type PathStep interface { |
| 40 | String() string |
| 41 | |
| 42 | // Type is the resulting type after performing the path step. |
| 43 | Type() reflect.Type |
| 44 | |
| 45 | // Values is the resulting values after performing the path step. |
| 46 | // The type of each valid value is guaranteed to be identical to Type. |
| 47 | // |
| 48 | // In some cases, one or both may be invalid or have restrictions: |
| 49 | // - For StructField, both are not interface-able if the current field |
| 50 | // is unexported and the struct type is not explicitly permitted by |
| 51 | // an Exporter to traverse unexported fields. |
| 52 | // - For SliceIndex, one may be invalid if an element is missing from |
| 53 | // either the x or y slice. |
| 54 | // - For MapIndex, one may be invalid if an entry is missing from |
| 55 | // either the x or y map. |
| 56 | // |
| 57 | // The provided values must not be mutated. |
| 58 | Values() (vx, vy reflect.Value) |
| 59 | } |
| 60 | |
| 61 | var ( |
| 62 | _ PathStep = StructField{} |
no outgoing calls
no test coverage detected