Add server side of things

This commit is contained in:
9seconds
2026-03-12 19:07:11 +01:00
parent 59557059df
commit 37f8d18be5
4 changed files with 298 additions and 3 deletions
+23
View File
@@ -0,0 +1,23 @@
package fake
import (
"bytes"
"sync"
)
var (
bytesPool = sync.Pool{
New: func() any {
return &bytes.Buffer{}
},
}
)
func acquireBuffer() *bytes.Buffer {
return bytesPool.Get().(*bytes.Buffer)
}
func releaseBuffer(b *bytes.Buffer) {
b.Reset()
bytesPool.Put(b)
}