diff options
| author | Rutger Broekhoff | 2024-01-02 18:56:31 +0100 |
|---|---|---|
| committer | Rutger Broekhoff | 2024-01-02 18:56:31 +0100 |
| commit | 8db41da676ac8368ef7c2549d56239a5ff5eedde (patch) | |
| tree | 09c427fd66de2ec1ebffc8342f5fdbb84b0701b5 /vendor/github.com/google/uuid/marshal.go | |
| parent | d4f75fb6db22e57577867445a022227e70958931 (diff) | |
| download | gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.tar.gz gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.zip | |
Delete vendor directory
Diffstat (limited to 'vendor/github.com/google/uuid/marshal.go')
| -rw-r--r-- | vendor/github.com/google/uuid/marshal.go | 38 |
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 14bd340..0000000 --- a/vendor/github.com/google/uuid/marshal.go +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | // Copyright 2016 Google Inc. All rights reserved. | ||
| 2 | // Use of this source code is governed by a BSD-style | ||
| 3 | // license that can be found in the LICENSE file. | ||
| 4 | |||
| 5 | package uuid | ||
| 6 | |||
| 7 | import "fmt" | ||
| 8 | |||
| 9 | // MarshalText implements encoding.TextMarshaler. | ||
| 10 | func (uuid UUID) MarshalText() ([]byte, error) { | ||
| 11 | var js [36]byte | ||
| 12 | encodeHex(js[:], uuid) | ||
| 13 | return js[:], nil | ||
| 14 | } | ||
| 15 | |||
| 16 | // UnmarshalText implements encoding.TextUnmarshaler. | ||
| 17 | func (uuid *UUID) UnmarshalText(data []byte) error { | ||
| 18 | id, err := ParseBytes(data) | ||
| 19 | if err != nil { | ||
| 20 | return err | ||
| 21 | } | ||
| 22 | *uuid = id | ||
| 23 | return nil | ||
| 24 | } | ||
| 25 | |||
| 26 | // MarshalBinary implements encoding.BinaryMarshaler. | ||
| 27 | func (uuid UUID) MarshalBinary() ([]byte, error) { | ||
| 28 | return uuid[:], nil | ||
| 29 | } | ||
| 30 | |||
| 31 | // UnmarshalBinary implements encoding.BinaryUnmarshaler. | ||
| 32 | func (uuid *UUID) UnmarshalBinary(data []byte) error { | ||
| 33 | if len(data) != 16 { | ||
| 34 | return fmt.Errorf("invalid UUID (got %d bytes)", len(data)) | ||
| 35 | } | ||
| 36 | copy(uuid[:], data) | ||
| 37 | return nil | ||
| 38 | } | ||