generic

package
v0.11.13 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 3 Imported by: 53 modules, 66 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApproxSizeOf added in v0.0.32

func ApproxSizeOf[T any](v T) (int, error)

SizeOf returns the approx size of a variable in bytes

func EqualsAll

func EqualsAll[T comparable](base T, all ...T) bool

EqualsAll checks if a base value of type T is equal to all of the other values of type T provided as arguments.

func EqualsAny

func EqualsAny[T comparable](base T, all ...T) bool

EqualsAny checks if a base value of type T is equal to any of the other values of type T provided as arguments.

Types

type Lockable added in v0.0.50

type Lockable[K any] struct {
	V K
	sync.RWMutex
}

func WithLock added in v0.0.50

func WithLock[K any](val K) *Lockable[K]

func (*Lockable[K]) Do added in v0.0.50

func (v *Lockable[K]) Do(f func(val K))

Jump to

Keyboard shortcuts

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