uuid

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

package uuid implements an UUID allocator, it's used to internal only.

NOTE: This package was copied from @https://github.com/google/uuid without unused parts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewString

func NewString() string

NewString returns a Random (Version 4) UUID string

Types

type UUID

type UUID [16]byte

A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC 4122.

func New

func New() (UUID, error)

New returns a Random (Version 4) UUID.

func NewFromReader

func NewFromReader(r io.Reader) (UUID, error)

NewFromReader returns a UUID based on bytes read from a given io.Reader.

func (UUID) String

func (uuid UUID) String() string

String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Jump to

Keyboard shortcuts

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