Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 801 Bytes

README.md

File metadata and controls

26 lines (21 loc) · 801 Bytes

GUID

Build Status GoDoc Go Report Card License

Simple, thread-safe MongoDB style GUID generator.

Examples

func main {
	// Create a new 12-byte globally-unique identifier
	id := guid.New96()
	fmt.Println(hex.EncodeToString(id.Bytes()))
}
func main {
	// Create a new 16-byte globally-unique identifier
	id := guid.New128()
	fmt.Println(hex.EncodeToString(id.Bytes()))
}