uuid

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package uuid 提供 RFC 9562 v4 UUID 的生成,复刻官方 util/crypto 的 randomUUID: 从密码学随机源取 16 字节,固定 version/variant 位后格式化为 8-4-4-4-12。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustV4

func MustV4() string

MustV4 生成 UUID,失败时 panic(仅用于不会失败的初始化场景)。

func NewV4

func NewV4() (string, error)

NewV4 生成一个随机 v4 UUID 字符串。

Types

This section is empty.

Jump to

Keyboard shortcuts

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