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

uuidmod

package
v0.38.0 Latest Latest
Warning

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

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

Documentation

Overview

Package uuidmod is the native module "uuid": new UUIDs as strings (TODO.md Q58).

use uuid;
println(uuid::v7());                 // 019a1b2c-3d4e-7f60-8a9b-0c1d2e3f4a5b
println(uuid::valid("not a uuid"));  // false

Version 7 is ordered by time (its first 48 bits are the time in milliseconds), so new keys land at the end of a database index; version 4 is entirely random. The db module's object mapping uses version 7 for a key declared "UUID". Versions 5 and 3 are derived from a namespace and a name (RFC 9562 section 5.5 and 5.3), so the same name always gives the same UUID; the module has the standard namespaces as constants.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func V7

func V7() string

V7 gives a new version 7 UUID in its usual form, lower case.

func Valid

func Valid(s string) bool

Valid reports whether s is a UUID in its usual form: 32 hexadecimal digits in groups of 8, 4, 4, 4 and 12, joined by "-" (either case).

Types

This section is empty.

Jump to

Keyboard shortcuts

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