MCPcopy
hub / github.com/google/go-cmp / Last

Method Last

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

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].

()

Source from the content-addressed store, hash-verified

79// If the path is empty, this returns a non-nil [PathStep]
80// that reports a nil [PathStep.Type].
81func (pa Path) Last() PathStep {
82 return pa.Index(-1)
83}
84
85// Index returns the ith step in the Path and supports negative indexing.
86// A negative index starts counting from the tail of the Path such that -1

Callers 6

ReportMethod · 0.80
comparerTestsFunction · 0.80
BenchmarkBytesFunction · 0.80
filterMethod · 0.80
filterMethod · 0.80
filterMethod · 0.80

Calls 1

IndexMethod · 0.95

Tested by 3

ReportMethod · 0.64
comparerTestsFunction · 0.64
BenchmarkBytesFunction · 0.64