utils

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KiB = 1024
	MiB = 1024 * KiB
	GiB = 1024 * MiB
)

Common units

Variables

This section is empty.

Functions

func RandomBytes added in v1.1.1

func RandomBytes(n int) []byte

RandomBytes returns a slice of n random bytes

Types

type Atomic

type Atomic[T any] struct {
	// contains filtered or unexported fields
}

Atomic provides atomic operations for a value of type T

func (*Atomic[T]) Get

func (a *Atomic[T]) Get() T

Get returns the value

func (*Atomic[T]) Set

func (a *Atomic[T]) Set(v T)

Set sets the value

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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