uuid

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamespaceDNS  = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
	NamespaceURL  = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"
	NamespaceOID  = "6ba7b812-9dad-11d1-80b4-00c04fd430c8"
	NamespaceX500 = "6ba7b814-9dad-11d1-80b4-00c04fd430c8"
)

Predefined namespace UUIDs from RFC 4122.

Variables

This section is empty.

Functions

func Format

func Format(b [16]byte) string

Format renders a 16-byte array as a canonical lowercase UUID string.

func Parse

func Parse(s string) ([16]byte, error)

Parse parses a UUID string into a 16-byte array.

func V4

func V4() (string, error)

V4 returns a randomly generated UUID version 4 string.

func V5

func V5(namespace string, name string) (string, error)

V5 returns a name-based UUID version 5 (SHA-1) string.

func Validate

func Validate(s string) bool

Validate reports whether s is a well-formed UUID string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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