uuidutil

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 3 Imported by: 5

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.

func ValidateDashless

func ValidateDashless(dashless string) error

ValidateDashless validates the dashless uuid is valid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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