Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInterfaces ¶
NewInterfaces returns a newly initialized buffer for N interface{} items, where 0 <= N.
Types ¶
type Interfaces ¶
type Interfaces struct {
// contains filtered or unexported fields
}
Interfaces is a data structure for storing the previous N string items, where 0 <= N <= arbitrary limit, and the arbitrary limit is proportional to how much memory ought to be allocated to the data structure.
func (*Interfaces) Drain ¶
func (tb *Interfaces) Drain() []interface{}
Drain returns all items from the structure. This implimentation is not designed to handle invocation of any other methods after calling Drain.
func (*Interfaces) QueueDequeue ¶
func (tb *Interfaces) QueueDequeue(newItem interface{}) (interface{}, bool)
QueueDequeue stores the newly provided item in the queue and returns the Nth previous item from the queue, along with a second return value of true. If exactly N or fewer than N items have thus far been stored in the buffer, a nil value will be returned along with a second return value of false.
type Strings ¶
type Strings struct {
// contains filtered or unexported fields
}
Strings is a data structure for storing the previous N string items, where 0 <= N <= arbitrary limit, and the arbitrary limit is proportional to how much memory ought to be allocated to the data structure.
func NewStrings ¶
NewStrings returns a newly initialized buffer for N string items, where 0 <= N.
func (*Strings) Drain ¶
Drain returns all items from the structure. This implimentation is not designed to handle invocation of any other methods after calling Drain.
func (*Strings) QueueDequeue ¶
QueueDequeue stores the newly provided item in the queue and returns the Nth previous item from the queue, along with a second return value of true. If exactly N or fewer than N items have thus far been stored in the buffer, an empty string will be returned along with a second return value of false.