This commit is contained in:
ItalyPaleAle 2025-05-23 07:46:38 -07:00
parent c0db11b473
commit 8816d9fa7c
No known key found for this signature in database
5 changed files with 11 additions and 5 deletions

View File

@ -1851,7 +1851,7 @@ func TestContextContentType(t *testing.T) {
func TestContextBindRequestTooLarge(t *testing.T) {
// Disabling this test when using sonic as JSON encoder because it doesn't cascade the error correctly
if json.IsSonic {
if json.Package == "github.com/bytedance/sonic" {
t.Skip()
return
}

View File

@ -20,3 +20,6 @@ var (
// NewEncoder is exported by gin/json package.
NewEncoder = json.NewEncoder
)
// Package indicates what library is being used for JSON encoding.
const Package = "github.com/goccy/go-json"

View File

@ -21,5 +21,5 @@ var (
NewEncoder = json.NewEncoder
)
// IsSonic indicates whether the sonic library is being used for JSON encoding.
const IsSonic = false
// Package indicates what library is being used for JSON encoding.
const Package = "encoding/json"

View File

@ -21,3 +21,6 @@ var (
// NewEncoder is exported by gin/json package.
NewEncoder = json.NewEncoder
)
// Package indicates what library is being used for JSON encoding.
const Package = "github.com/json-iterator/go"

View File

@ -22,5 +22,5 @@ var (
NewEncoder = json.NewEncoder
)
// IsSonic indicates whether the sonic library is being used for JSON encoding.
const IsSonic = true
// Package indicates what library is being used for JSON encoding.
const Package = "github.com/bytedance/sonic"