type Path … type PathStep … var _ … var _ … var _ … var _ … var _ … var _ … func (pa *Path) push(s PathStep) { … } func (pa *Path) pop() { … } // Last returns the last [PathStep] in the Path. // If the path is empty, this returns a non-nil [PathStep] // that reports a nil [PathStep.Type]. func (pa Path) Last() PathStep { … } // Index returns the ith step in the Path and supports negative indexing. // A negative index starts counting from the tail of the Path such that -1 // refers to the last step, -2 refers to the second-to-last step, and so on. // If index is invalid, this returns a non-nil [PathStep] // that reports a nil [PathStep.Type]. func (pa Path) Index(i int) PathStep { … } // String returns the simplified path to a node. // The simplified path only contains struct field accesses. // // For example: // // MyMap.MySlices.MyField func (pa Path) String() string { … } // GoString returns the path to a specific node using Go syntax. // // For example: // // (*root.MyMap["key"].(*mypkg.MyStruct).MySlices)[2][3].MyField func (pa Path) GoString() string { … } type pathStep … func (ps pathStep) Type() reflect.Type { … } func (ps pathStep) Values() (vx, vy reflect.Value) { … } func (ps pathStep) String() string { … } type StructField … type structField … func (sf StructField) Type() reflect.Type { … } func (sf StructField) Values() (vx, vy reflect.Value) { … } func (sf StructField) String() string { … } // Name is the field name. func (sf StructField) Name() string { … } // Index is the index of the field in the parent struct type. // See [reflect.Type.Field]. func (sf StructField) Index() int { … } type SliceIndex … type sliceIndex … func (si SliceIndex) Type() reflect.Type { … } func (si SliceIndex) Values() (vx, vy reflect.Value) { … } func (si SliceIndex) String() string { … } // Key is the index key; it may return -1 if in a split state func (si SliceIndex) Key() int { … } // SplitKeys are the indexes for indexing into slices in the // x and y values, respectively. These indexes may differ due to the // insertion or removal of an element in one of the slices, causing // all of the indexes to be shifted. If an index is -1, then that // indicates that the element does not exist in the associated slice. // // [SliceIndex.Key] is guaranteed to return -1 if and only if the indexes // returned by SplitKeys are not the same. SplitKeys will never return -1 for // both indexes. func (si SliceIndex) SplitKeys() (ix, iy int) { … } type MapIndex … type mapIndex … func (mi MapIndex) Type() reflect.Type { … } func (mi MapIndex) Values() (vx, vy reflect.Value) { … } func (mi MapIndex) String() string { … } // Key is the value of the map key. func (mi MapIndex) Key() reflect.Value { … } type Indirect … type indirect … func (in Indirect) Type() reflect.Type { … } func (in Indirect) Values() (vx, vy reflect.Value) { … } func (in Indirect) String() string { … } type TypeAssertion … type typeAssertion … func (ta TypeAssertion) Type() reflect.Type { … } func (ta TypeAssertion) Values() (vx, vy reflect.Value) { … } func (ta TypeAssertion) String() string { … } type Transform … type transform … func (tf Transform) Type() reflect.Type { … } func (tf Transform) Values() (vx, vy reflect.Value) { … } func (tf Transform) String() string { … } // Name is the name of the [Transformer]. func (tf Transform) Name() string { … } // Func is the function pointer to the transformer function. func (tf Transform) Func() reflect.Value { … } // Option returns the originally constructed [Transformer] option. // The == operator can be used to detect the exact option used. func (tf Transform) Option() Option { … } type pointerPath … func (p *pointerPath) Init() { … } // Push indicates intent to descend into pointers vx and vy where // visited reports whether either has been seen before. If visited before, // equal reports whether both pointers were encountered together. // Pop must be called if and only if the pointers were never visited. // // The pointers vx and vy must be a reflect.Ptr, reflect.Slice, or reflect.Map // and be non-nil. func (p pointerPath) Push(vx, vy reflect.Value) (equal, visited bool) { … } // Pop ascends from pointers vx and vy. func (p pointerPath) Pop(vx, vy reflect.Value) { … } // isExported reports whether the identifier is exported. func isExported(id string) bool { … }