Help us shape the future of Go! Take the 2026 Go Developer Survey

uuid

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package uuid provides minimal UUID generation (v4 random, v5 name-based SHA1).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UUID

type UUID [16]byte

UUID is a 16-byte UUID value.

var Nil UUID

Nil is the all-zeros UUID.

func New

func New() UUID

New returns a random UUID (version 4).

func NewSHA1

func NewSHA1(ns UUID, data []byte) UUID

NewSHA1 returns a deterministic name-based UUID (version 5) derived from namespace and data.

func (UUID) String

func (id UUID) String() string

String returns the standard UUID string representation.

Jump to

Keyboard shortcuts

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