mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-14 12:12:12 +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) {
|
func TestContextBindRequestTooLarge(t *testing.T) {
|
||||||
// Disabling this test when using sonic as JSON encoder because it doesn't cascade the error correctly
|
// 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()
|
t.Skip()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -20,3 +20,6 @@ var (
|
|||||||
// NewEncoder is exported by gin/json package.
|
// NewEncoder is exported by gin/json package.
|
||||||
NewEncoder = json.NewEncoder
|
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
|
NewEncoder = json.NewEncoder
|
||||||
)
|
)
|
||||||
|
|
||||||
// IsSonic indicates whether the sonic library is being used for JSON encoding.
|
// Package indicates what library is being used for JSON encoding.
|
||||||
const IsSonic = false
|
const Package = "encoding/json"
|
||||||
|
@ -21,3 +21,6 @@ var (
|
|||||||
// NewEncoder is exported by gin/json package.
|
// NewEncoder is exported by gin/json package.
|
||||||
NewEncoder = json.NewEncoder
|
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
|
NewEncoder = json.NewEncoder
|
||||||
)
|
)
|
||||||
|
|
||||||
// IsSonic indicates whether the sonic library is being used for JSON encoding.
|
// Package indicates what library is being used for JSON encoding.
|
||||||
const IsSonic = true
|
const Package = "github.com/bytedance/sonic"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user