We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 10515c6 + 9143f35 commit 12c1c98Copy full SHA for 12c1c98
encode.go
@@ -14,7 +14,6 @@ import (
14
type Encoder struct {
15
w io.Writer
16
buf []byte
17
- pool sync.Pool
18
enabledIndent bool
19
enabledHTMLEscape bool
20
prefix []byte
@@ -65,7 +64,6 @@ func init() {
65
64
New: func() interface{} {
66
return &Encoder{
67
buf: make([]byte, 0, bufSize),
68
- pool: encPool,
69
structTypeToCompiledCode: map[uintptr]*compiledCode{},
70
structTypeToCompiledIndentCode: map[uintptr]*compiledCode{},
71
}
@@ -119,7 +117,7 @@ func (e *Encoder) SetIndent(prefix, indent string) {
119
117
120
118
func (e *Encoder) release() {
121
e.w = nil
122
- e.pool.Put(e)
+ encPool.Put(e)
123
124
125
func (e *Encoder) reset() {
0 commit comments