MCPcopy Create free account
hub / github.com/beeker1121/goque / Length

Method Length

stack.go:258–260  ·  view source on GitHub ↗

Length returns the total number of items in the stack.

()

Source from the content-addressed store, hash-verified

256
257// Length returns the total number of items in the stack.
258func (s *Stack) Length() uint64 {
259 return s.head - s.tail
260}
261
262// Close closes the LevelDB database of the stack.
263func (s *Stack) Close() error {

Callers 15

getItemByIDMethod · 0.95
TestStackCloseFunction · 0.45
TestStackPushFunction · 0.45
TestStackPopFunction · 0.45
TestStackPeekFunction · 0.45
TestStackPeekByOffsetFunction · 0.45
TestStackPeekByIDFunction · 0.45
TestPrefixQueueCloseFunction · 0.45
TestPrefixQueueEnqueueFunction · 0.45
TestPrefixQueueDequeueFunction · 0.45
TestPrefixQueuePeekFunction · 0.45

Calls

no outgoing calls

Tested by 15

TestStackCloseFunction · 0.36
TestStackPushFunction · 0.36
TestStackPopFunction · 0.36
TestStackPeekFunction · 0.36
TestStackPeekByOffsetFunction · 0.36
TestStackPeekByIDFunction · 0.36
TestPrefixQueueCloseFunction · 0.36
TestPrefixQueueEnqueueFunction · 0.36
TestPrefixQueueDequeueFunction · 0.36
TestPrefixQueuePeekFunction · 0.36
TestPrefixQueuePeekByIDFunction · 0.36