mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-14 04:08:15 +08:00
Fix
This commit is contained in:
parent
c0db11b473
commit
8816d9fa7c
@ -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
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user