We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5d0d36 commit bfb86faCopy full SHA for bfb86fa
version4.go
@@ -14,6 +14,14 @@ func New() UUID {
14
return Must(NewRandom())
15
}
16
17
+// NewString creates a new random UUID and returns it as a string or panics.
18
+// NewString is equivalent to the expression
19
+//
20
+// uuid.New().String()
21
+func NewString() string {
22
+ return Must(NewRandom()).String()
23
+}
24
+
25
// NewRandom returns a Random (Version 4) UUID.
26
//
27
// The strength of the UUIDs is based on the strength of the crypto/rand
0 commit comments