uuid

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2016 License: MIT Imports: 5 Imported by: 7 modules, 16 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

View Source
var (
	ErrInvalidID = errors.New("Invalid ID.")
)

Functions

This section is empty.

Types

type UUID

type UUID [16]byte

func New

func New() *UUID

New creates an UUID with random value.

func ParseBytes

func ParseBytes(b []byte) (*UUID, error)

PraseBytes converts an UUID in byte form to object.

func ParseString

func ParseString(str string) (*UUID, error)

ParseString converts an UUID in string form to object.

func (*UUID) Bytes

func (this *UUID) Bytes() []byte

Bytes returns the bytes representation of this UUID.

func (*UUID) Equals added in v1.9.1

func (this *UUID) Equals(another *UUID) bool

Equals returns true if this UUID equals another UUID by value.

func (*UUID) Next added in v1.9.1

func (this *UUID) Next() *UUID

Next generates a deterministic random UUID based on this UUID.

func (*UUID) String

func (this *UUID) String() string

String returns the string representation of this UUID.

Jump to

Keyboard shortcuts

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