util

package
v0.0.0-...-ea74aed Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClampInt

func ClampInt(value, min, max int) int

func ListenForInterrupt

func ListenForInterrupt(ctx context.Context, cancel context.CancelFunc, callback func(context.Context))

func MaxInt

func MaxInt(left, right int) int

func MinInt

func MinInt(left, right int) int

func Ptr

func Ptr[T any](value T) *T

Types

type Set

type Set map[string]bool

func NewSet

func NewSet(elements ...string) Set

func (Set) Add

func (s Set) Add(key string)

func (Set) Del

func (s Set) Del(key string)

func (Set) Equals

func (left Set) Equals(right Set) bool

func (Set) EqualsStrs

func (left Set) EqualsStrs(right []string) bool

func (Set) Has

func (s Set) Has(key string) bool

Jump to

Keyboard shortcuts

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