mirror of
https://github.com/restic/restic.git
synced 2026-11-22 07:08:11 +00:00
Move Server and Key to new sub-package
This commit is contained in:
1 parent
8498753eb7
commit
d19b23d4f1
28 files changed
+317
-356
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/restic/restic/chunker"
|
||||
)
|
||||
|
||||
var bufPool = sync.Pool{
|
||||
New: func() interface{} {
|
||||
return make([]byte, chunker.MinSize)
|
||||
},
|
||||
}
|
||||
|
||||
func getBuf() []byte {
|
||||
return bufPool.Get().([]byte)
|
||||
}
|
||||
|
||||
func freeBuf(data []byte) {
|
||||
bufPool.Put(data)
|
||||
}
|
||||
Reference in new issue
Block a user