MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / NewBuilder

Function NewBuilder

utils/binary/pool.go:20–26  ·  view source on GitHub ↗

NewBuilder 从池中取出一个 Builder

(key ...byte)

Source from the content-addressed store, hash-verified

18
19// NewBuilder 从池中取出一个 Builder
20func NewBuilder(key ...byte) *Builder {
21 b := bufferPool.NewBuffer(nil)
22 b.P(func(ub *pbuf.UserBuffer[teacfg]) {
23 ub.DAT.init(key)
24 })
25 return (*Builder)(b)
26}
27
28var gzipPool = sync.Pool{
29 New: func() any {

Callers 15

buildCode2dPacketMethod · 0.92
FetchQRCodeMethod · 0.92
GetQRCodeResultMethod · 0.92
QRCodeLoginMethod · 0.92
MarshalMethod · 0.92
PackPacketMethod · 0.92
MarshalMethod · 0.92
MarshalMethod · 0.92
T18Function · 0.92
T100Function · 0.92
T106Function · 0.92

Calls 1

initMethod · 0.45

Tested by 5

TestBuilderFunction · 0.68
TestBuilderTEAFunction · 0.68
BenchmarkNewBuilder128Function · 0.68
BenchmarkNewBuilder128_3Function · 0.68
BenchmarkNewBuilder128_5Function · 0.68