Bladeren bron

add internal package which includes json package (#1504)

田欧 7 jaren geleden
bovenliggende
commit
72db8acd99
7 gewijzigde bestanden met toevoegingen van 5 en 5 verwijderingen
  1. 1 1
      binding/json.go
  2. 1 1
      errors.go
  3. 1 1
      errors_test.go
  4. 0 0
      internal/json/json.go
  5. 0 0
      internal/json/jsoniter.go
  6. 1 1
      render/json.go
  7. 1 1
      render/json_17.go

+ 1 - 1
binding/json.go

@@ -9,7 +9,7 @@ import (
 	"io"
 	"io"
 	"net/http"
 	"net/http"
 
 
-	"github.com/gin-gonic/gin/json"
+	"github.com/gin-gonic/gin/internal/json"
 )
 )
 
 
 // EnableDecoderUseNumber is used to call the UseNumber method on the JSON
 // EnableDecoderUseNumber is used to call the UseNumber method on the JSON

+ 1 - 1
errors.go

@@ -9,7 +9,7 @@ import (
 	"fmt"
 	"fmt"
 	"reflect"
 	"reflect"
 
 
-	"github.com/gin-gonic/gin/json"
+	"github.com/gin-gonic/gin/internal/json"
 )
 )
 
 
 type ErrorType uint64
 type ErrorType uint64

+ 1 - 1
errors_test.go

@@ -8,7 +8,7 @@ import (
 	"errors"
 	"errors"
 	"testing"
 	"testing"
 
 
-	"github.com/gin-gonic/gin/json"
+	"github.com/gin-gonic/gin/internal/json"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/assert"
 )
 )
 
 

+ 0 - 0
json/json.go → internal/json/json.go


+ 0 - 0
json/jsoniter.go → internal/json/jsoniter.go


+ 1 - 1
render/json.go

@@ -10,7 +10,7 @@ import (
 	"html/template"
 	"html/template"
 	"net/http"
 	"net/http"
 
 
-	"github.com/gin-gonic/gin/json"
+	"github.com/gin-gonic/gin/internal/json"
 )
 )
 
 
 type JSON struct {
 type JSON struct {

+ 1 - 1
render/json_17.go

@@ -9,7 +9,7 @@ package render
 import (
 import (
 	"net/http"
 	"net/http"
 
 
-	"github.com/gin-gonic/gin/json"
+	"github.com/gin-gonic/gin/internal/json"
 )
 )
 
 
 type PureJSON struct {
 type PureJSON struct {