summaryrefslogtreecommitdiff
path: root/borrowed_misc.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-02-07 12:45:46 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-02-07 14:05:37 -0700
commit643cbc4d6e37d07619bec05039da1abb411d28d4 (patch)
tree68f771d5103d0243ed49b21ff896f01e49a81a72 /borrowed_misc.go
parent2b9473f5e8816eeea76b2fdada184532be00d3a2 (diff)
Move struct-handling to internal/jsonstruct
Diffstat (limited to 'borrowed_misc.go')
-rw-r--r--borrowed_misc.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/borrowed_misc.go b/borrowed_misc.go
index b84158b..59c49aa 100644
--- a/borrowed_misc.go
+++ b/borrowed_misc.go
@@ -8,8 +8,6 @@ package lowmemjson
import (
"reflect"
- "strings"
- "unicode"
)
// isEmptyValue is borrowed from encode.go.
@@ -30,21 +28,3 @@ func isEmptyValue(v reflect.Value) bool {
}
return false
}
-
-// isValidTag is borrowed from encode.go.
-func isValidTag(s string) bool {
- if s == "" {
- return false
- }
- for _, c := range s {
- switch {
- case strings.ContainsRune("!#$%&()*+-./:;<=>?@[]^_{|}~ ", c):
- // Backslash and quote chars are reserved, but
- // otherwise any punctuation chars are allowed
- // in a tag name.
- case !unicode.IsLetter(c) && !unicode.IsDigit(c):
- return false
- }
- }
- return true
-}