uuidv4

package
v0.0.0-...-746562c Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UUIDV4

type UUIDV4 [16]byte

UUID type.

func FromStrV4

func FromStrV4(s string) (id UUIDV4, err error)

FromStr returns a UUID based on a string. The string could be in the following format:

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

If the string is not in one of these formats, it'll return an error.

func MustFromStrV4

func MustFromStrV4(s string) UUIDV4

MustFromStr behaves similarly to FromStr except that it'll panic instead of returning an error.

func RandV4

func RandV4() UUIDV4

Rand generates a new version 4 UUID.

func (UUIDV4) HexV4

func (uuid UUIDV4) HexV4() string

Hex string returns a hex string representation of the UUID v4 in xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx format.

func (UUIDV4) RawV4

func (uuid UUIDV4) RawV4() [16]byte

Jump to

Keyboard shortcuts

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