All checks were successful
Go Action / goaction (push) Successful in 19m15s
Reviewed-on: #19
23 lines
251 B
Go
23 lines
251 B
Go
package entry
|
|
|
|
import "sync"
|
|
|
|
//nolint:gochecknoglobals
|
|
var pool = sync.Pool{
|
|
New: func() any {
|
|
return New()
|
|
},
|
|
}
|
|
|
|
//nolint:forcetypeassert
|
|
func Get() *Entry {
|
|
e := pool.Get().(*Entry)
|
|
e.Reset()
|
|
|
|
return e
|
|
}
|
|
|
|
func Put(e *Entry) {
|
|
pool.Put(e)
|
|
}
|