MCPcopy Create free account
hub / github.com/ClashDotNetFramework/experimental-clash / Last

Method Last

common/queue/queue.go:38–47  ·  view source on GitHub ↗

Last returns the last of item.

()

Source from the content-addressed store, hash-verified

36
37// Last returns the last of item.
38func (q *Queue) Last() interface{} {
39 if len(q.items) == 0 {
40 return nil
41 }
42
43 q.lock.RLock()
44 last := q.items[len(q.items)-1]
45 q.lock.RUnlock()
46 return last
47}
48
49// Copy get the copy of queue.
50func (q *Queue) Copy() []interface{} {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected