summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-09-22 21:41:51 -0300
committerEuAndreh <eu@euandre.org>2024-09-22 21:48:09 -0300
commit4693a9fd486694dedda1c241097829b8b2f040a4 (patch)
treedf12f742f23eaeb0f7c677b94c98263ed25c9581 /src
parentsrc/guuid.go: Export UUIDByteCount (diff)
downloaduuid-4693a9fd486694dedda1c241097829b8b2f040a4.tar.gz
uuid-4693a9fd486694dedda1c241097829b8b2f040a4.tar.xz
src/guuid.go: Add NewBytes() function
Diffstat (limited to 'src')
-rw-r--r--src/guuid.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/guuid.go b/src/guuid.go
index 7d69fca..0d20021 100644
--- a/src/guuid.go
+++ b/src/guuid.go
@@ -53,6 +53,11 @@ func New() UUID {
return uuid
}
+func NewBytes() []byte {
+ id := New()
+ return id[:]
+}
+
func (uuid UUID) String() string {
dst := [uuidEncodedLength]byte {
0, 0, 0, 0,