mirror of
https://github.com/fumiama/orbyte.git
synced 2026-06-10 21:24:50 +08:00
init
This commit is contained in:
15
README.md
15
README.md
@@ -1,2 +1,17 @@
|
||||
# orbyte
|
||||
Lightweight & Safe (buffer-writer | general object) pool.
|
||||
|
||||
## Quick Start
|
||||
```go
|
||||
import (
|
||||
"crypto/rand"
|
||||
|
||||
"github.com/fumiama/orbyte/pbuf"
|
||||
)
|
||||
|
||||
func main() {
|
||||
b := pbuf.NewBytes(1024) // Allocate Bytes from pool.
|
||||
rand.Read(b.Bytes()) // Do sth.
|
||||
b.Destroy() // Optional, can be auto-destroyed on GC.
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user