util

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IfElse added in v1.1.0

func IfElse[T any](condition bool, ifTrue, ifFalse T) T

func Must

func Must(err error)

func MustReturn

func MustReturn[T any](value T, err error) T

Types

type Deque

type Deque[T any] interface {
	IsEmpty() bool
	Poll() T
	Offer(value T) bool
	LastIndex() int
}

func NewCappedDeque

func NewCappedDeque[T any](maxSize, initialSize int) Deque[T]

func NewDeque

func NewDeque[T any](initialSize int) Deque[T]

type Pair added in v1.1.0

type Pair[L, R comparable] struct {
	L L
	R R
}

Jump to

Keyboard shortcuts

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