queue

package
v0.5.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pop

func Pop[T any](t testingT, queue *[]Item[T]) (T, error)

Pop removes the next item from the queue and returns it.

func PopErr added in v0.5.0

func PopErr[T any](t testingT, queue *[]Item[T]) error

PopErr removes the next item from the queue and returns only the error from it.

func PopRetainLast

func PopRetainLast[T any](t testingT, queue *[]Item[T]) (T, error)

PopRetainLast removes the next item from the queue and returns it. The last item is not removed and therefore returned on every subsequent call.

Types

type Errs added in v0.5.0

type Errs []error

func (*Errs) Pop added in v0.5.0

func (e *Errs) Pop(t *testing.T) error

Pop removes the first item from the error queue and returns it.

func (*Errs) PopOrNil added in v0.5.0

func (e *Errs) PopOrNil(t testingT) error

PopOrNil removes the next item from the queue and returns it. If the queue is empty, nil is returned.

type Item

type Item[T any] struct {
	Value T
	Err   error
}

Jump to

Keyboard shortcuts

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