mirror of
https://github.com/jimeh/rands.git
synced 2026-02-19 11:26:38 +00:00
feat(strings): add UUID function to generate random RFC 4122 UUID v4 strings
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user