uuidutil

package
v1.76.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 4 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromDashless

func FromDashless(dashless string) (uuid.UUID, error)

FromDashless returns the dashless uuid with dashes.

func FromString

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

FromString returns the uuid from the string.

As opposed to uuid.FromString, this only accepts uuids with dashes. Always use this instead of uuid.FromString.

func FromStringSlice added in v1.0.0

func FromStringSlice(s []string) ([]uuid.UUID, error)

FromStringSlice returns a slice of uuids from the string slice.

This only accepts uuids with dashes.

func New

func New() (uuid.UUID, error)

New returns a new random UUIDv4.

func ToDashless

func ToDashless(id uuid.UUID) string

ToDashless returns the uuid without dashes.

func Validate

func Validate(s string) error

Validate determines if the given UUID string is valid and not uuid.Nil.

func ValidateDashless

func ValidateDashless(dashless string) error

ValidateDashless validates the dashless uuid is valid and not uuid.Nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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