diff options
author | 2023-08-28 07:12:40 +0000 | |
---|---|---|
committer | 2023-08-28 07:12:40 +0000 | |
commit | 2ec313a21fee25f5022e748315ea5e7d587384f6 (patch) | |
tree | 649b04a17d7fd5ac0d0e02148b3643c6e36e75e3 /vendor/github.com/google/uuid/uuid.go | |
parent | [chore]: Bump github.com/KimMachineGun/automemlimit from 0.2.6 to 0.3.0 (#2165) (diff) | |
download | gotosocial-2ec313a21fee25f5022e748315ea5e7d587384f6.tar.xz |
[chore]: Bump github.com/google/uuid from 1.3.0 to 1.3.1 (#2166)
Diffstat (limited to 'vendor/github.com/google/uuid/uuid.go')
-rw-r--r-- | vendor/github.com/google/uuid/uuid.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vendor/github.com/google/uuid/uuid.go b/vendor/github.com/google/uuid/uuid.go index a57207aeb..a56138cc4 100644 --- a/vendor/github.com/google/uuid/uuid.go +++ b/vendor/github.com/google/uuid/uuid.go @@ -69,7 +69,7 @@ func Parse(s string) (UUID, error) { // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx case 36 + 9: - if strings.ToLower(s[:9]) != "urn:uuid:" { + if !strings.EqualFold(s[:9], "urn:uuid:") { return uuid, fmt.Errorf("invalid urn prefix: %q", s[:9]) } s = s[9:] @@ -101,7 +101,8 @@ func Parse(s string) (UUID, error) { 9, 11, 14, 16, 19, 21, - 24, 26, 28, 30, 32, 34} { + 24, 26, 28, 30, 32, 34, + } { v, ok := xtob(s[x], s[x+1]) if !ok { return uuid, errors.New("invalid UUID format") @@ -117,7 +118,7 @@ func ParseBytes(b []byte) (UUID, error) { switch len(b) { case 36: // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx case 36 + 9: // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - if !bytes.Equal(bytes.ToLower(b[:9]), []byte("urn:uuid:")) { + if !bytes.EqualFold(b[:9], []byte("urn:uuid:")) { return uuid, fmt.Errorf("invalid urn prefix: %q", b[:9]) } b = b[9:] @@ -145,7 +146,8 @@ func ParseBytes(b []byte) (UUID, error) { 9, 11, 14, 16, 19, 21, - 24, 26, 28, 30, 32, 34} { + 24, 26, 28, 30, 32, 34, + } { v, ok := xtob(b[x], b[x+1]) if !ok { return uuid, errors.New("invalid UUID format") |