summaryrefslogtreecommitdiff
path: root/vendor/github.com/bytedance/sonic/decoder
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2025-04-14 09:43:56 +0200
committerLibravatar GitHub <noreply@github.com>2025-04-14 09:43:56 +0200
commit51b9ef5c346f333e558eca38fd954464322f3b7d (patch)
treebf5cd0de887a27c1afc66345b1a464921d96e503 /vendor/github.com/bytedance/sonic/decoder
parent[docs] Remind the user that password resets don't work without restarting. (#... (diff)
downloadgotosocial-51b9ef5c346f333e558eca38fd954464322f3b7d.tar.xz
[chore]: Bump github.com/gin-contrib/gzip from 1.2.2 to 1.2.3 (#4000)
Bumps [github.com/gin-contrib/gzip](https://github.com/gin-contrib/gzip) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/gin-contrib/gzip/releases) - [Changelog](https://github.com/gin-contrib/gzip/blob/master/.goreleaser.yaml) - [Commits](https://github.com/gin-contrib/gzip/compare/v1.2.2...v1.2.3) --- updated-dependencies: - dependency-name: github.com/gin-contrib/gzip dependency-version: 1.2.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/bytedance/sonic/decoder')
-rw-r--r--vendor/github.com/bytedance/sonic/decoder/decoder_compat.go41
-rw-r--r--vendor/github.com/bytedance/sonic/decoder/decoder_native.go5
2 files changed, 26 insertions, 20 deletions
diff --git a/vendor/github.com/bytedance/sonic/decoder/decoder_compat.go b/vendor/github.com/bytedance/sonic/decoder/decoder_compat.go
index a0e1de4da..754e5fbc2 100644
--- a/vendor/github.com/bytedance/sonic/decoder/decoder_compat.go
+++ b/vendor/github.com/bytedance/sonic/decoder/decoder_compat.go
@@ -1,4 +1,5 @@
-// +build !amd64,!arm64 go1.24 !go1.17 arm64,!go1.20
+//go:build (!amd64 && !arm64) || go1.25 || !go1.17 || (arm64 && !go1.20)
+// +build !amd64,!arm64 go1.25 !go1.17 arm64,!go1.20
/*
* Copyright 2023 ByteDance Inc.
@@ -19,30 +20,33 @@
package decoder
import (
- `bytes`
- `encoding/json`
- `io`
- `reflect`
- `unsafe`
-
- `github.com/bytedance/sonic/internal/native/types`
- `github.com/bytedance/sonic/option`
+ "bytes"
+ "encoding/json"
+ "io"
+ "reflect"
+ "unsafe"
+
+ "github.com/bytedance/sonic/internal/decoder/consts"
+ "github.com/bytedance/sonic/internal/native/types"
+ "github.com/bytedance/sonic/option"
+ "github.com/bytedance/sonic/internal/compat"
)
func init() {
- println("WARNING: sonic/decoder only supports (Go1.17~1.23 && CPU amd64) or (go1.20~1.23 && CPU arm64), but your environment is not suitable")
+ compat.Warn("sonic/decoder")
}
const (
- _F_use_int64 = 0
- _F_disable_urc = 2
- _F_disable_unknown = 3
- _F_copy_string = 4
+ _F_use_int64 = consts.F_use_int64
+ _F_disable_urc = consts.F_disable_unknown
+ _F_disable_unknown = consts.F_disable_unknown
+ _F_copy_string = consts.F_copy_string
- _F_use_number = types.B_USE_NUMBER
- _F_validate_string = types.B_VALIDATE_STRING
- _F_allow_control = types.B_ALLOW_CONTROL
- _F_no_validate_json = types.B_NO_VALIDATE_JSON
+ _F_use_number = consts.F_use_number
+ _F_validate_string = consts.F_validate_string
+ _F_allow_control = consts.F_allow_control
+ _F_no_validate_json = consts.F_no_validate_json
+ _F_case_sensitive = consts.F_case_sensitive
)
type Options uint64
@@ -55,6 +59,7 @@ const (
OptionCopyString Options = 1 << _F_copy_string
OptionValidateString Options = 1 << _F_validate_string
OptionNoValidateJSON Options = 1 << _F_no_validate_json
+ OptionCaseSensitive Options = 1 << _F_case_sensitive
)
func (self *Decoder) SetOptions(opts Options) {
diff --git a/vendor/github.com/bytedance/sonic/decoder/decoder_native.go b/vendor/github.com/bytedance/sonic/decoder/decoder_native.go
index 450dfb624..563ca944b 100644
--- a/vendor/github.com/bytedance/sonic/decoder/decoder_native.go
+++ b/vendor/github.com/bytedance/sonic/decoder/decoder_native.go
@@ -1,5 +1,5 @@
-//go:build (amd64 && go1.17 && !go1.24) || (arm64 && go1.20 && !go1.24)
-// +build amd64,go1.17,!go1.24 arm64,go1.20,!go1.24
+//go:build (amd64 && go1.17 && !go1.25) || (arm64 && go1.20 && !go1.25)
+// +build amd64,go1.17,!go1.25 arm64,go1.20,!go1.25
/*
@@ -44,6 +44,7 @@ const (
OptionCopyString Options = api.OptionCopyString
OptionValidateString Options = api.OptionValidateString
OptionNoValidateJSON Options = api.OptionNoValidateJSON
+ OptionCaseSensitive Options = api.OptionCaseSensitive
)
// StreamDecoder is the decoder context object for streaming input.