Commit 4d87e058 authored by 李志信's avatar 李志信

fix: add cap and len of make

parent c5fc6e3b
...@@ -46,10 +46,10 @@ type jsonStructParser struct { ...@@ -46,10 +46,10 @@ type jsonStructParser struct {
func newJSONStructParser() *jsonStructParser { func newJSONStructParser() *jsonStructParser {
return &jsonStructParser{ return &jsonStructParser{
structFields: make([]reflect.StructField, 0), structFields: make([]reflect.StructField, 0, 16),
valueMap: make(map[string]string), valueMap: make(map[string]string, 8),
hessianRegisterPair: make([]HessianRegisterPair, 0), hessianRegisterPair: make([]HessianRegisterPair, 0, 16),
subObjValueMap: make(map[string]reflect.Value), subObjValueMap: make(map[string]reflect.Value, 8),
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment