Documentation
¶
Overview ¶
Package uuid exports typing for UUIDs. Sub-packages export functions for generating UUIDs of different types.
Example ¶
package main import ( "fmt" "4d63.com/uuid" ) func main() { id, _ := uuid.Parse("08827178-0ad4-11e7-b5df-b3f54921aa61") fmt.Println("String:", id.String()) fmt.Println("Timestamp:", id.Timestamp()) }
Output: String: 08827178-0ad4-11e7-b5df-b3f54921aa61 Timestamp: 1290011724057047416
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UUID ¶
type UUID [16]byte
UUID is an implementation of the UUID RFC4122 standard. Ref: https://www.ietf.org/rfc/rfc4122.txt
func (UUID) Timestamp ¶
Timestamp returns the integer value of the time portion of the UUID in 100ns intervals since Oct 15, 1582.
Note: All UUIDs have a time bits, but only TimeUUIDs (UUID v1) contain the time in these bits, making the return value of this function relatively useless for other UUIDs.