restore v0.3.0

This commit is contained in:
andrey1s
2021-09-19 17:25:47 +03:00
parent f9ae79614a
commit deb67b0008
37 changed files with 3472 additions and 332 deletions

21
entry/pool.go Normal file
View File

@@ -0,0 +1,21 @@
package entry
import "sync"
// nolint: gochecknoglobals
var pool = sync.Pool{
New: func() interface{} {
return New()
},
}
func Get() *Entry {
e := pool.Get().(*Entry)
e.Reset()
return e
}
func Put(e *Entry) {
pool.Put(e)
}