uuid

package
v0.27.0-rc.11 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 1 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate() string

Generate returns a new UUID v4 from the package's backend. Use it rather than the uuid package directly, so a test can make identifiers deterministic.

func Parse added in v0.24.1

func Parse(s string) (uuid.UUID, error)

Parse reads a UUID from its string form. It does not go through the backend: parsing has no behaviour worth substituting in a test.

Types

type UUID

type UUID interface {
	Generate() string
}

UUID is an interface that can provide uuid related functionality which allows us to test uuid dependent code.

var DefaultBackend UUID

DefaultBackend is used to configure the defaultBackend.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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