]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blob - vendor/github.com/satori/go.uuid/README.md
Initial transfer of provider code
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / satori / go.uuid / README.md
1 # UUID package for Go language
2
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)
6
7 This package provides pure Go implementation of Universally Unique Identifier (UUID). Supported both creation and parsing of UUIDs.
8
9 With 100% test coverage and benchmarks out of box.
10
11 Supported versions:
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)
17
18 ## Installation
19
20 Use the `go` command:
21
22 $ go get github.com/satori/go.uuid
23
24 ## Requirements
25
26 UUID package requires Go >= 1.2.
27
28 ## Example
29
30 ```go
31 package main
32
33 import (
34 "fmt"
35 "github.com/satori/go.uuid"
36 )
37
38 func main() {
39 // Creating UUID Version 4
40 u1 := uuid.NewV4()
41 fmt.Printf("UUIDv4: %s\n", u1)
42
43 // Parsing UUID from string input
44 u2, err := uuid.FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
45 if err != nil {
46 fmt.Printf("Something gone wrong: %s", err)
47 }
48 fmt.Printf("Successfully parsed: %s", u2)
49 }
50 ```
51
52 ## Documentation
53
54 [Documentation](http://godoc.org/github.com/satori/go.uuid) is hosted at GoDoc project.
55
56 ## Links
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)
59
60 ## Copyright
61
62 Copyright (C) 2013-2016 by Maxim Bublis <b@codemonkey.ru>.
63
64 UUID package released under MIT License.
65 See [LICENSE](https://github.com/satori/go.uuid/blob/master/LICENSE) for details.