MCPcopy
hub / github.com/kubernetes/client-go / Newest

Method Newest

tools/cache/delta_fifo.go:632–637  ·  view source on GitHub ↗

Newest is a convenience function that returns the newest delta, or nil if there are no deltas.

()

Source from the content-addressed store, hash-verified

630// Newest is a convenience function that returns the newest delta, or
631// nil if there are no deltas.
632func (d Deltas) Newest() *Delta {
633 if n := len(d); n > 0 {
634 return &d[n-1]
635 }
636 return nil
637}
638
639// copyDeltas returns a shallow copy of d; that is, it copies the slice but not
640// the objects in the slice. This allows Get/List to return an object that we

Callers 6

KeyOfMethod · 0.80
AddIfNotPresentMethod · 0.80
listLockedMethod · 0.80
ReplaceMethod · 0.80
testPopFunction · 0.80
ExampleFunction · 0.80

Calls

no outgoing calls

Tested by 2

testPopFunction · 0.64
ExampleFunction · 0.64