Help us shape the future of Go! Take the 2026 Go Developer Survey

queue

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyQueue

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

AnyQueue is a queue stores any

func NewAnyQueue

func NewAnyQueue(eq func(a any, b any) bool, aa ...any) *AnyQueue

NewAnyQueue builds a AnyQueue

func (*AnyQueue) Get

func (q *AnyQueue) Get(val any) any

Get returns previous stored value that equals to val and remove it from the queue, if not found, return nil

func (*AnyQueue) Put

func (q *AnyQueue) Put(val any)

Put inserts `val` into `q`.

Jump to

Keyboard shortcuts

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