go.uuid/README.md

60 lines
1.5 KiB
Markdown
Raw Normal View History

2013-06-18 12:32:41 +04:00
# UUID package for Go language
2013-12-03 18:49:33 +04:00
[![Build Status](https://travis-ci.org/satori/go.uuid.png?branch=master)](https://travis-ci.org/satori/go.uuid)
[![GoDoc](http://godoc.org/github.com/satori/go.uuid?status.png)](http://godoc.org/github.com/satori/go.uuid)
2013-07-17 15:06:34 +04:00
2013-07-09 17:10:05 +04:00
This package provides implementation of Universally Unique Identifier (UUID).
2013-12-04 19:03:41 +04:00
With 100% test coverage and benchmarks out of box.
2013-12-03 20:03:45 +04:00
Supported versions:
* Version 1, based on timestamp and MAC address (RFC 4122)
* Version 2, based on timestamp, MAC address and POSIX UID/GID (DCE 1.1)
* Version 3, based on MD5 hashing (RFC 4122)
* Version 4, based on random numbers (RFC 4122)
* Version 5, based on SHA-1 hashing (RFC 4122)
2013-06-18 12:32:41 +04:00
2013-06-18 15:15:15 +04:00
## Installation
Use the `go` command:
2013-12-03 18:48:45 +04:00
$ go get github.com/satori/go.uuid
2013-06-18 15:15:15 +04:00
## Requirements
UUID package requires any stable version of Go Programming Language.
2013-12-03 14:02:22 +04:00
It is tested against following versions of Go: 1.0, 1.1, 1.2
## Example
```go
package main
import (
"fmt"
2013-12-03 18:48:45 +04:00
"github.com/satori/go.uuid"
)
func main() {
// Creating UUID Version 4
u := uuid.NewV4()
2013-12-04 19:03:41 +04:00
fmt.Printf("UUIDv4: %s\n", u)
}
```
2013-06-18 15:15:15 +04:00
## Documentation
2013-12-03 18:48:45 +04:00
[Documentation](http://godoc.org/github.com/satori/go.uuid) is hosted at GoDoc project.
2013-06-18 15:15:15 +04:00
## Links
* [RFC 4122](http://tools.ietf.org/html/rfc4122)
* [DCE 1.1: Authentication and Security Services](http://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01)
2013-06-18 12:32:41 +04:00
## Copyright
2013-06-18 15:15:15 +04:00
Copyright (C) 2013 by Maxim Bublis <b@codemonkey.ru>.
2013-06-19 01:51:09 +04:00
UUID package released under MIT License.
2013-12-03 18:48:45 +04:00
See [LICENSE](https://github.com/satori/go.uuid/blob/master/LICENSE) for details.