MCPcopy Create free account
hub / github.com/google/go-cmp / Index

Method Index

cmp/path.go:216–216  ·  view source on GitHub ↗

Index is the index of the field in the parent struct type. See [reflect.Type.Field].

()

Source from the content-addressed store, hash-verified

214// Index is the index of the field in the parent struct type.
215// See [reflect.Type.Field].
216func (sf StructField) Index() int { return sf.idx }
217
218// SliceIndex is a [PathStep] that represents an index operation on
219// a slice or array at some index [SliceIndex.Key].

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected