README.md

 1# UUID package for Go language
 2
 3This is a fork of satori/go.uuid that won't change the existing API.
 4
 5[![Build Status](https://travis-ci.org/kevinburke/go.uuid.png?branch=master)](https://travis-ci.org/kevinburke/go.uuid)
 6[![Coverage Status](https://coveralls.io/repos/github/kevinburke/go.uuid/badge.svg?branch=master)](https://coveralls.io/github/kevinburke/go.uuid)
 7[![GoDoc](http://godoc.org/github.com/kevinburke/go.uuid?status.png)](http://godoc.org/github.com/kevinburke/go.uuid)
 8
 9This package provides pure Go implementation of Universally Unique Identifier (UUID). Supported both creation and parsing of UUIDs.
10
11With 100% test coverage and benchmarks out of box.
12
13Supported versions:
14* Version 1, based on timestamp and MAC address (RFC 4122)
15* Version 2, based on timestamp, MAC address and POSIX UID/GID (DCE 1.1)
16* Version 3, based on MD5 hashing (RFC 4122)
17* Version 4, based on random numbers (RFC 4122)
18* Version 5, based on SHA-1 hashing (RFC 4122)
19
20## Installation
21
22Use the `go` command:
23
24	$ go get github.com/kevinburke/go.uuid
25
26## Requirements
27
28UUID package requires Go >= 1.5.
29
30## Example
31
32```go
33package main
34
35import (
36	"fmt"
37
38	"github.com/kevinburke/go.uuid"
39)
40
41func main() {
42	// Creating UUID Version 4
43	u1 := uuid.NewV4()
44	fmt.Printf("UUIDv4: %s\n", u1)
45
46	// Parsing UUID from string input
47	u2, err := uuid.FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
48	if err != nil {
49		fmt.Printf("Something gone wrong: %s", err)
50	}
51	fmt.Printf("Successfully parsed: %s", u2)
52}
53```
54
55## Documentation
56
57[Documentation](http://godoc.org/github.com/kevinburke/go.uuid) is hosted at GoDoc project.
58
59## Links
60* [RFC 4122](http://tools.ietf.org/html/rfc4122)
61* [DCE 1.1: Authentication and Security Services](http://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01)
62
63## Copyright
64
65Copyright (C) 2013-2018 by Maxim Bublis <b@codemonkey.ru>.
66
67UUID package released under MIT License.
68See [LICENSE](https://github.com/kevinburke/go.uuid/blob/master/LICENSE) for details.