diff options
| author | EuAndreh <eu@euandre.org> | 2024-09-22 21:41:51 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2024-09-22 21:48:09 -0300 |
| commit | 4693a9fd486694dedda1c241097829b8b2f040a4 (patch) | |
| tree | df12f742f23eaeb0f7c677b94c98263ed25c9581 /src/guuid.go | |
| parent | src/guuid.go: Export UUIDByteCount (diff) | |
| download | uuid-4693a9fd486694dedda1c241097829b8b2f040a4.tar.gz uuid-4693a9fd486694dedda1c241097829b8b2f040a4.tar.xz | |
src/guuid.go: Add NewBytes() function
Diffstat (limited to 'src/guuid.go')
| -rw-r--r-- | src/guuid.go | 5 |
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, |
