uuid

package
v0.0.0-...-5a547ea Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 5 Imported by: 3

README

uuid

Library based on google/uuid package

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EMPTY, _ = uuid.Parse("00000000-0000-0000-0000-000000000000")

Functions

func IsEmpty

func IsEmpty(id string) bool

IsEmpty returns true if is empty UUID.

func NewSafeUUID

func NewSafeUUID() (r string)

NewSafeUUID returns random generated UUID safely.

func NewUUID

func NewUUID() string

NewUUID returns random generated UUID.

func NewUUIDWithName

func NewUUIDWithName(name string) string

NewUUIDWithName returns UUID based on SHA-1 hash of namespace UUID and name.

func NoDashUUID

func NoDashUUID(id string) string

NoDashUUID returns no dash('-') id.

func ToUUID

func ToUUID(id string) string

ToUUID returns lowercase string of id.

func Valid

func Valid(id string) (result bool)

Valid returns true if valid UUID.

func ValidNoDash

func ValidNoDash(id string) (result bool)

ValidNoDash returns true if valid UUID that no dash and not equal empty.

func ValidNoEmpty

func ValidNoEmpty(id string) bool

ValidNoEmpty returns true if valid UUID and not equal empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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