1
0
mirror of https://github.com/fumiama/go-registry.git synced 2026-06-24 04:30:28 +08:00

优化速度

This commit is contained in:
fumiama
2022-02-15 13:26:16 +08:00
parent e7c05d8bc8
commit b6a85b186c
4 changed files with 171 additions and 181 deletions

11
pool.go Normal file
View File

@@ -0,0 +1,11 @@
package registry
import "sync"
var pool sync.Pool
func init() {
pool.New = func() interface{} {
return new(CmdPacket)
}
}