feat(strings): add UUID function to generate random RFC 4122 UUID v4 strings

This commit is contained in:
2021-03-16 02:14:56 +00:00
parent a755fe957a
commit 825a3c18fb
3 changed files with 61 additions and 0 deletions

View File

@@ -70,3 +70,8 @@ func ExampleDNSLabel() {
s, _ := rands.DNSLabel(16)
fmt.Println(s) // => z0ij9o8qkbs0ru-h
}
func ExampleUUID() {
s, _ := rands.UUID()
fmt.Println(s) // => a62b8712-f238-43ba-a47e-333f5fffe785
}