uuid

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: MPL-2.0 Imports: 4 Imported by: 1,332 modules, 3,191 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.

README

uuid Run CI Tests

Generates UUID-format strings using high quality, purely random bytes. It is not intended to be RFC compliant, merely to use a well-understood string representation of a 128-bit value. It can also parse UUID-format strings into their component bytes.

Documentation

The full documentation is available on pkg.go.dev.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatUUID

func FormatUUID(buf []byte) (string, error)

func GenerateRandomBytes

func GenerateRandomBytes(size int) ([]byte, error)

GenerateRandomBytes is used to generate random bytes of given size.

func GenerateRandomBytesWithReader added in v1.0.2

func GenerateRandomBytesWithReader(size int, reader io.Reader) ([]byte, error)

GenerateRandomBytesWithReader is used to generate random bytes of given size read from a given reader.

func GenerateUUID

func GenerateUUID() (string, error)

GenerateUUID is used to generate a random UUID

func GenerateUUIDWithReader added in v1.0.2

func GenerateUUIDWithReader(reader io.Reader) (string, error)

GenerateUUIDWithReader is used to generate a random UUID with a given Reader

func ParseUUID

func ParseUUID(uuid string) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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