From 4693a9fd486694dedda1c241097829b8b2f040a4 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 22 Sep 2024 21:41:51 -0300 Subject: src/guuid.go: Add NewBytes() function --- src/guuid.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/guuid.go') 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, -- cgit v1.2.3