util

package
v0.0.0-...-8e5a076 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Align

func Align(offset, alignment int) int

func Elapsed

func Elapsed(name string) float32

func NewUUID

func NewUUID(length int) string

func Timer

func Timer(name string)

func ValidateAlignment

func ValidateAlignment(value any) error

ValidateAlignment checks if a given struct shares the memory layout of an equivalent C struct

Types

type SyncMap

type SyncMap[K comparable, V any] struct {
	// contains filtered or unexported fields
}

Type-safe sync.Map implementation Read sync.Map documentation for caveats

func NewSyncMap

func NewSyncMap[K comparable, V any]() *SyncMap[K, V]

func (*SyncMap[K, V]) Load

func (m *SyncMap[K, V]) Load(key K) (value V, exists bool)

func (*SyncMap[K, V]) Store

func (m *SyncMap[K, V]) Store(key K, value V)

Jump to

Keyboard shortcuts

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