summaryrefslogtreecommitdiff
path: root/vendor/github.com/google/uuid/marshal.go
diff options
context:
space:
mode:
authorLibravatar Terin Stock <terinjokes@gmail.com>2025-03-09 17:47:56 +0100
committerLibravatar Terin Stock <terinjokes@gmail.com>2025-03-10 01:59:49 +0100
commit3ac1ee16f377d31a0fb80c8dae28b6239ac4229e (patch)
treef61faa581feaaeaba2542b9f2b8234a590684413 /vendor/github.com/google/uuid/marshal.go
parent[chore] update URLs to forked source (diff)
downloadgotosocial-3ac1ee16f377d31a0fb80c8dae28b6239ac4229e.tar.xz
[chore] remove vendor
Diffstat (limited to 'vendor/github.com/google/uuid/marshal.go')
-rw-r--r--vendor/github.com/google/uuid/marshal.go38
1 files changed, 0 insertions, 38 deletions
diff --git a/vendor/github.com/google/uuid/marshal.go b/vendor/github.com/google/uuid/marshal.go
deleted file mode 100644
index 14bd34072..000000000
--- a/vendor/github.com/google/uuid/marshal.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2016 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package uuid
-
-import "fmt"
-
-// MarshalText implements encoding.TextMarshaler.
-func (uuid UUID) MarshalText() ([]byte, error) {
- var js [36]byte
- encodeHex(js[:], uuid)
- return js[:], nil
-}
-
-// UnmarshalText implements encoding.TextUnmarshaler.
-func (uuid *UUID) UnmarshalText(data []byte) error {
- id, err := ParseBytes(data)
- if err != nil {
- return err
- }
- *uuid = id
- return nil
-}
-
-// MarshalBinary implements encoding.BinaryMarshaler.
-func (uuid UUID) MarshalBinary() ([]byte, error) {
- return uuid[:], nil
-}
-
-// UnmarshalBinary implements encoding.BinaryUnmarshaler.
-func (uuid *UUID) UnmarshalBinary(data []byte) error {
- if len(data) != 16 {
- return fmt.Errorf("invalid UUID (got %d bytes)", len(data))
- }
- copy(uuid[:], data)
- return nil
-}