uuid

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToHex

func BytesToHex(bytes []byte) string

func FromBytes

func FromBytes(bytes []byte) (string, error)

func HexToBytes

func HexToBytes(s string) ([]byte, error)

func ToBytes

func ToBytes(uuid string) ([]byte, error)

func ValidV4

func ValidV4(s string) bool

Valid checks if the given string has a valid xxxxxxxx-xxxx-4xxx-[89ab]xxx-xxxxxxxxxxxx uuid format

Types

type RealUuid

type RealUuid struct{}

func (*RealUuid) NewV4

func (u *RealUuid) NewV4() string

NewV4 returns a UUID v4 string

type Uuid

type Uuid interface {
	NewV4() string
}

func New

func New() Uuid

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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