summaryrefslogtreecommitdiff
path: root/vendor/github.com/google/uuid/version4.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/google/uuid/version4.go')
-rw-r--r--vendor/github.com/google/uuid/version4.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/github.com/google/uuid/version4.go b/vendor/github.com/google/uuid/version4.go
index c110465db..86160fbd0 100644
--- a/vendor/github.com/google/uuid/version4.go
+++ b/vendor/github.com/google/uuid/version4.go
@@ -14,6 +14,14 @@ func New() UUID {
return Must(NewRandom())
}
+// NewString creates a new random UUID and returns it as a string or panics.
+// NewString is equivalent to the expression
+//
+// uuid.New().String()
+func NewString() string {
+ return Must(NewRandom()).String()
+}
+
// NewRandom returns a Random (Version 4) UUID.
//
// The strength of the UUIDs is based on the strength of the crypto/rand