diff options
author | 2024-11-25 15:42:37 +0000 | |
---|---|---|
committer | 2024-11-25 15:42:37 +0000 | |
commit | 3fceb5fc1a83a6ba3ca3c314eef50f0b45cd6009 (patch) | |
tree | d9fd78a82ec2352aad47d50cd9176e150f600b07 /vendor/github.com/buger/jsonparser/bytes_safe.go | |
parent | [bugfix] notification types missing from link header (#3571) (diff) | |
download | gotosocial-3fceb5fc1a83a6ba3ca3c314eef50f0b45cd6009.tar.xz |
bumps uptrace/bun dependencies to v1.2.6 (#3569)
Diffstat (limited to 'vendor/github.com/buger/jsonparser/bytes_safe.go')
-rw-r--r-- | vendor/github.com/buger/jsonparser/bytes_safe.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/github.com/buger/jsonparser/bytes_safe.go b/vendor/github.com/buger/jsonparser/bytes_safe.go new file mode 100644 index 000000000..ff16a4a19 --- /dev/null +++ b/vendor/github.com/buger/jsonparser/bytes_safe.go @@ -0,0 +1,25 @@ +// +build appengine appenginevm + +package jsonparser + +import ( + "strconv" +) + +// See fastbytes_unsafe.go for explanation on why *[]byte is used (signatures must be consistent with those in that file) + +func equalStr(b *[]byte, s string) bool { + return string(*b) == s +} + +func parseFloat(b *[]byte) (float64, error) { + return strconv.ParseFloat(string(*b), 64) +} + +func bytesToString(b *[]byte) string { + return string(*b) +} + +func StringToBytes(s string) []byte { + return []byte(s) +} |