1 # UUID package for Go language
3 [![Build Status](https://travis-ci.org/satori/go.uuid.png?branch=master)](https://travis-ci.org/satori/go.uuid)
4 [![Coverage Status](https://coveralls.io/repos/github/satori/go.uuid/badge.svg?branch=master)](https://coveralls.io/github/satori/go.uuid)
5 [![GoDoc](http://godoc.org/github.com/satori/go.uuid?status.png)](http://godoc.org/github.com/satori/go.uuid)
7 This package provides pure Go implementation of Universally Unique Identifier (UUID). Supported both creation and parsing of UUIDs.
9 With 100% test coverage and benchmarks out of box.
12 * Version 1, based on timestamp and MAC address (RFC 4122)
13 * Version 2, based on timestamp, MAC address and POSIX UID/GID (DCE 1.1)
14 * Version 3, based on MD5 hashing (RFC 4122)
15 * Version 4, based on random numbers (RFC 4122)
16 * Version 5, based on SHA-1 hashing (RFC 4122)
22 $ go get github.com/satori/go.uuid
26 UUID package requires Go >= 1.2.
35 "github.com/satori/go.uuid"
39 // Creating UUID Version 4
41 fmt.Printf("UUIDv4: %s\n", u1)
43 // Parsing UUID from string input
44 u2, err := uuid.FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
46 fmt.Printf("Something gone wrong: %s", err)
48 fmt.Printf("Successfully parsed: %s", u2)
54 [Documentation](http://godoc.org/github.com/satori/go.uuid) is hosted at GoDoc project.
57 * [RFC 4122](http://tools.ietf.org/html/rfc4122)
58 * [DCE 1.1: Authentication and Security Services](http://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01)
62 Copyright (C) 2013-2016 by Maxim Bublis <b@codemonkey.ru>.
64 UUID package released under MIT License.
65 See [LICENSE](https://github.com/satori/go.uuid/blob/master/LICENSE) for details.