container

package
v0.0.0-...-af59c4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter(collection *list.List, fn func(value interface{}, index int64) bool) *list.List

func Find

func Find(collection *list.List, fn func(value interface{}, index int64) bool) *list.Element

func FindAfter

func FindAfter(last *list.Element, fn func(value interface{}) bool) *list.Element

func FindByElement

func FindByElement(collection *list.List, fn func(element *list.Element, index int64) bool) *list.Element

func ForEach

func ForEach(collection *list.List, fn func(value interface{}, index int64))

func ForEachElement

func ForEachElement(collection *list.List, fn func(element *list.Element, index int64))

func Map

func Map(collection *list.List, fn func(value interface{}, index int64) interface{}) *list.List

Types

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

Queue is a simple concurrent queue

func NewQueue

func NewQueue() *Queue

NewQueue creates a new queue

func (*Queue) Len

func (queue *Queue) Len() int

Len returns the item count in the queue

func (*Queue) Pop

func (queue *Queue) Pop() interface{}

Pop remove the head of the queue

func (*Queue) Push

func (queue *Queue) Push(v interface{})

Push to the queue

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL