forked from nu7hatch/gouuid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
42 lines (29 loc) · 848 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Pure Go UUID implementation
===========================
This package provides immutable UUID structs and the functions
NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4
and 5 UUIDs as specified in RFC 4122.
Installation
------------
Use the `goinstall` tool:
$ goinstall github.com/nu7hatch/gouuid
... or install it manually:
$ git clone git://github.com/nu7hatch/gouuid.git
$ cd gouuid
$ make install
Usage
-----
package main
import uuid "github.com/nu7hatch/gouuid"
func main() {
// generating v4
u4, _ := uuid.NewV4()
// generating v5 (or v3...)
u5, _ := uuid.NewV5(uuid.NamespaceURL, "nu7hat.ch")
// parsing
u, _ := uuid.ParseHex("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
}
Copyright
---------
Copyright (C) 2011 by Krzysztof Kowalik <[email protected]>
See COPYING file for details.