diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-16 19:06:46 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-16 21:24:15 -0700 |
commit | 2b7fff828e29b63ae08a871b4b1e74784fab29e5 (patch) | |
tree | d95b3a00d4703c4c5eb41dce1529e4d675293ce5 /internal/jsonparse/hex.go | |
parent | 1e2d058c78969118b099940afdb100a3b93325cc (diff) |
Clean up the hex handling
Diffstat (limited to 'internal/jsonparse/hex.go')
-rw-r--r-- | internal/jsonparse/hex.go | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/internal/jsonparse/hex.go b/internal/jsonparse/hex.go deleted file mode 100644 index 3ed5f01..0000000 --- a/internal/jsonparse/hex.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com> -// -// SPDX-License-Identifier: GPL-2.0-or-later - -package jsonparse - -const Hex = "0123456789abcdef" - -func HexToInt(c rune) (byte, bool) { - switch { - case '0' <= c && c <= '9': - return byte(c) - '0', true - case 'a' <= c && c <= 'f': - return byte(c) - 'a' + 10, true - case 'A' <= c && c <= 'F': - return byte(c) - 'A' + 10, true - default: - return 0, false - } -} |