uuid

package
v0.0.0-...-b05aa3b Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package uuid provide interface for generate and parse rfc4122 version 4 randomly UUIDs.

Index

Constants

This section is empty.

Variables

View Source
var ErrFormat = errors.New("uuid: Bad Format")

Functions

This section is empty.

Types

type UUID

type UUID [16]byte

UUID

func New

func New() (u UUID)

New UUID

func Parse

func Parse(s string) (UUID, error)

Parse UUID in "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" (8-4-4-4-12) format

func (UUID) IsNil

func (u UUID) IsNil() bool

IsNil report whether the UUID is "00000000-0000-0000-0000-000000000000"

func (UUID) IsRFC4122

func (u UUID) IsRFC4122() bool

func (UUID) MarshalText

func (u UUID) MarshalText() (text []byte, err error)

func (*UUID) Scan

func (u *UUID) Scan(state fmt.ScanState, verb rune) (err error)

func (UUID) String

func (u UUID) String() string

String format "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" (8-4-4-4-12)

func (*UUID) UnmarshalText

func (u *UUID) UnmarshalText(text []byte) (err error)

func (UUID) Version

func (u UUID) Version() int

Jump to

Keyboard shortcuts

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