Skip to content

frankenbeanies/uuid4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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")