mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-02 11:56:53 +00:00
style: fmt
This commit is contained in:
@@ -36,6 +36,7 @@ var BufPoolCopy = sync.Pool{
|
||||
return &buf
|
||||
},
|
||||
}
|
||||
|
||||
func PutBufPoolUdp(buf []byte) {
|
||||
if cap(buf) == PoolSizeUdp {
|
||||
BufPoolUdp.Put(buf[:PoolSizeUdp])
|
||||
@@ -48,7 +49,7 @@ func PutBufPoolCopy(buf []byte) {
|
||||
}
|
||||
}
|
||||
|
||||
func GetBufPoolCopy() ([]byte) {
|
||||
func GetBufPoolCopy() []byte {
|
||||
return (*BufPoolCopy.Get().(*[]byte))[:PoolSizeCopy]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user