Skip to content

Latest commit

 

History

History
57 lines (36 loc) · 1.2 KB

README.md

File metadata and controls

57 lines (36 loc) · 1.2 KB

UUID4

Build Status Coverage Status Go Report Card GoDoc

An RFC 4122 compliant UUID library

License

MIT

Installation

$ go get github.com/frankenbeanies/uuid4

Usage

import "github.com/frankenbeanies/uuid4"

Methods

New()

Generates a new UUID4

uuid := uuid4.New()

String()

Provides an RFC 4122 compliant string representation of the UUID4

uuidStr := uuid4.New().String()
fmt.Println(uuidStr)

Bytes()

Provides the byte representation of UUID4

uuidBytes := uuid4.New().Bytes()
fmt.Println(uuid)

ParseString()

Parses string into a UUID4

uuid := uuid4.ParseString("cc2161ae-33c1-4cb1-aa53-e81000f20a30")