Tao Wen 8 vuotta sitten
vanhempi
commit
2dc0031b26

+ 1 - 1
feature_config.go

@@ -17,7 +17,7 @@ type Config struct {
 	EscapeHTML              bool
 	SortMapKeys             bool
 	UseNumber               bool
-	TagKey					string
+	TagKey                  string
 }
 
 type frozenConfig struct {

+ 1 - 1
feature_json_number.go

@@ -12,4 +12,4 @@ func CastJsonNumber(val interface{}) (string, bool) {
 		return string(typedVal), true
 	}
 	return "", false
-}
+}

+ 1 - 1
feature_reflect_object.go

@@ -4,8 +4,8 @@ import (
 	"fmt"
 	"io"
 	"reflect"
-	"unsafe"
 	"strings"
+	"unsafe"
 )
 
 func encoderOfStruct(cfg *frozenConfig, typ reflect.Type) (ValEncoder, error) {

+ 1 - 1
feature_reflect_struct_decoder.go

@@ -4,8 +4,8 @@ import (
 	"fmt"
 	"io"
 	"reflect"
-	"unsafe"
 	"strings"
+	"unsafe"
 )
 
 func createStructDecoder(typ reflect.Type, fields map[string]*structFieldDecoder) (ValDecoder, error) {

+ 1 - 1
jsoniter_customize_test.go

@@ -313,4 +313,4 @@ func Test_recursive_empty_interface_customization(t *testing.T) {
 	should := require.New(t)
 	Unmarshal([]byte("[100]"), &obj)
 	should.Equal([]interface{}{int64(100)}, obj)
-}
+}

+ 2 - 2
jsoniter_invalid_test.go

@@ -103,7 +103,7 @@ func Test_chan(t *testing.T) {
 	t.Skip("do not support chan")
 
 	type TestObject struct {
-		MyChan chan bool
+		MyChan  chan bool
 		MyField int
 	}
 
@@ -112,4 +112,4 @@ func Test_chan(t *testing.T) {
 	str, err := json.Marshal(obj)
 	should.Nil(err)
 	should.Equal(``, str)
-}
+}

+ 1 - 1
jsoniter_struct_decoder_test.go

@@ -1,8 +1,8 @@
 package jsoniter
 
 import (
-	"testing"
 	"github.com/stretchr/testify/require"
+	"testing"
 )
 
 func Test_decode_one_field_struct(t *testing.T) {