Tao Wen 8 년 전
부모
커밋
8367a97ad8
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 3
      feature_reflect.go
  2. 1 1
      jsoniter_customize_test.go

+ 3 - 3
feature_reflect.go

@@ -5,8 +5,8 @@ import (
 	"encoding/json"
 	"fmt"
 	"reflect"
-	"unsafe"
 	"time"
+	"unsafe"
 )
 
 // Decoder is an internal type registered to cache as needed.
@@ -170,7 +170,7 @@ func (encoder *optionalEncoder) isEmpty(ptr unsafe.Pointer) bool {
 }
 
 type placeholderEncoder struct {
-	cfg *frozenConfig
+	cfg      *frozenConfig
 	cacheKey reflect.Type
 }
 
@@ -200,7 +200,7 @@ func (encoder *placeholderEncoder) getRealEncoder() Encoder {
 }
 
 type placeholderDecoder struct {
-	cfg *frozenConfig
+	cfg      *frozenConfig
 	cacheKey reflect.Type
 }
 

+ 1 - 1
jsoniter_customize_test.go

@@ -231,4 +231,4 @@ func Test_marshaler_on_struct(t *testing.T) {
 	fixed := tmStruct{"hello"}
 	//json.Marshal(fixed)
 	Marshal(fixed)
-}
+}