func ExampleNewV2() {
	// Must run before using V1 or V2
	uuid.Init()

	u2 := uuid.NewV2(uuid.DomainUser)
	fmt.Printf("version %d variant %d: %d\n", u2.Version(), u2.Variant(), u2)
}
Пример #2
0
func BenchmarkNewV2(b *testing.B) {
	for i := 0; i < b.N; i++ {
		uuid.NewV2(uuid.DomainGroup)
	}
	b.StopTimer()
	b.ReportAllocs()
}